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

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..
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.