
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); } }

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);
}
}