Java long type literal

Question

What is the output of the following code?


public class Main {
  public static void main(String args[]) {

    long a = 123.123L;

    System.out.println(a);
  }
}


Compile time error

Note

L is for long type literal, for double use D.

If you are using L and literal should be an integer value.




PreviousNext

Related