-1
public static void main(String str[]){// String type
    System.out.println("Main()");
    main(0100);}
public static void main(int a){//integer type
    System.out.println(a);
}

answer should be 100 rather 64

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Himanshu
  • 13
  • 6

1 Answers1

0

In Java, if you put a 0 before a primitive literal, it is interpretted as octal. 100 in octal is 64 in decimal.

Kon
  • 10,702
  • 6
  • 41
  • 58