-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,040,783
  • 362
  • 3,548
  • 3,513
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,477
  • 6
  • 37
  • 56