Java Datatype

Java Datatype

What will be the output of following java program and why?

class Datatype{
     public static void main(String[] args){
          byte number=0101;
          System.out.print(number);
     }
}
View Answers

August 27, 2012 at 12:27 PM

The given code displays the output 65. The value stored in byte is binary number. Therefore it displays its corresponding integer value.

class Datatype{
     public static void main(String[] args){
          byte number=0101;
          System.out.print(number);
     }
}

August 27, 2012 at 6:42 PM

how that respective value in binary is converted into integer value?? and most importantly i don't think that is in binary. will you please explain that?? and thank you for your response .. i really appreciate it..

Ads









Related Tutorials/Questions & Answers:
Java Datatype
Java Datatype  What will be the output of following java program and why? class Datatype{ public static void main(String[] args.... Therefore it displays its corresponding integer value. class Datatype{ public
Java Datatype
Java Datatype  What will be the output of following java program and why? class Datatype{ public static void main(String[] args.... Therefore it displays its corresponding integer value. class Datatype{ public
Advertisements
Java Primitive Datatype
Java Primitive Datatype  what is the size of boolean datatype ? please explain in detail
Java String Datatype
Java String Datatype  Weather String in java is class or Datatype,if it's clss then How can i assign String str="hello";   String is a class found in the package java.lang.*. When we represent string in double quotes
Datatype convertion
Datatype convertion  it possible to convert long datatype into string in java if possible means how
Boolean DataType
Boolean DataType  What is the Size of the Boolean datatype in Java
ModuleNotFoundError: No module named 'datatype'
ModuleNotFoundError: No module named 'datatype'  Hi, My Python... 'datatype' How to remove the ModuleNotFoundError: No module named 'datatype... to install padas library. You can install datatype python with following
ModuleNotFoundError: No module named 'datatype'
ModuleNotFoundError: No module named 'datatype'  Hi, My Python... 'datatype' How to remove the ModuleNotFoundError: No module named 'datatype... to install padas library. You can install datatype python with following
Writing a trigger for an userdefined datatype
Writing a trigger for an userdefined datatype  i have a user defined datatype in EMP table like COLUMNNAME:ADDRS_TYPE where ADDRS_TYPE have the following columns DATATYPE :ADDRESS VARCHAR2(136) V_CODE VARCHAR2(8) T_CODE
ModuleNotFoundError: No module named 'datatype-tools'
ModuleNotFoundError: No module named 'datatype-tools'  Hi, My... named 'datatype-tools' How to remove the ModuleNotFoundError: No module named 'datatype-tools' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'datatype-tools'
ModuleNotFoundError: No module named 'datatype-tools'  Hi, My... named 'datatype-tools' How to remove the ModuleNotFoundError: No module named 'datatype-tools' error? Thanks   Hi, In your python
Mysql Alter Column Datatype
Mysql Alter Column Datatype       Mysql Alter Column Datatype is used to modify the table and change the datatype of field. Understand with Example The Tutorial illustrate
Mysql Decimal Datatype
Mysql Decimal Datatype       Mysql Decimal Datatype is used to specify the numeric values. Understand with Example The Tutorial give you an example from 'Mysql Decimal Datatype
Java - Identifier and primitive datatype in java
Java - Identifier and Primitive Data Types in java  ... you how to use these identifier in you  java programming. Identifier... stored by identifier is defined by the special java keyword is termed
Version of com.bedatadriven>jackson-datatype-jts dependency
List of Version of com.bedatadriven>jackson-datatype-jts dependency
Mysql nchar Datatype
Mysql nchar Datatype       MySQL nchar define the datatype nchar that stores fixed-length character data. The data can be a string single-byte or multibyte letters, digits
Maven Dependency jackson-datatype-jts >> 2.2
You should include the dependency code given in this page to add Maven Dependency of com.bedatadriven >> jackson-datatype-jts version2.2 in your project
Maven Dependency jackson-datatype-jts >> 2.0
You should include the dependency code given in this page to add Maven Dependency of com.bedatadriven >> jackson-datatype-jts version2.0 in your project
Maven Dependency jackson-datatype-jts >> 2.4
You should include the dependency code given in this page to add Maven Dependency of com.bedatadriven >> jackson-datatype-jts version2.4 in your project
Maven Dependency jackson-datatype-jts >> 2.3
You should include the dependency code given in this page to add Maven Dependency of com.bedatadriven >> jackson-datatype-jts version2.3 in your project
Java Methods
Java Methods      ... of operator returns the datatype of an operand. You can see in the given example....    In Java, java.lang.reflect.*; package
java
java  how to identify method,attribute,variable,datatype,object in java program?give the explanation with program
Java - Arithmetic Operation, Conversion and Casts in java
Java - Arithmetic Operation, Conversion and Casts in java       This example illustrates that what is type casting? Type Casting  refers to changing an entity of one datatype
SQL Decimal
SQL Decimal       SQL Decimal is used to specify the values in decimal datatype. The Decimal datatype can be of two types : Decimal (p) refers to floating point and Decimal fixed
Data Type: bool
Data Type: bool       This Example shows you how to use bool datatype in velocity. Methods... a boolean datatype variable. $bool: Display boolean datatype variable
java servlet programming - JSP-Servlet
java servlet programming  when i m inserting an image file into the sql table in a column of data type binary using prepared statement... in the column of datatype binary
Mysql Alter Data Type
datatype in a table. Understand with Example The Tutorial cover an example... 'userform' with required fieldname and datatype respectively.The table 'userform' has...; column datatype from "contact( bigint)" to contact(varchar(130). 
MySQL nchar
MySQL nchar       MySQL nchar define the datatype nchar that stores fixed-length character data. The data can be a string single-byte or multibyte letters, digits and symbols
Mysql Table Describe
Mysql Table Describe       Mysql Table Describe is used to describe the Fieldtype, Datatype, Null and Key etc of the table. Understand with Example The Tutorial illustrate
Mysql Alter Column
the datatype of existing column. Understand with Example The Tutorial illustrate... Column', we create a table 'employee1' with required fieldname and datatype... (0.00 sec) Query to view datatype of  Table named
Mysql Create Table
. To grasp this example, we create a table 'Stu' with required fieldname and datatype

Ads