fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7.  
  8. class PrimitiveTpes
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int a = 50;
  13. int b = 500000000;
  14. long c = 50000000;
  15. long d = 50000000000L; // it's mean the number is integer if another type isn't mentioned.
  16. byte e = 50;
  17. byte f = -50;
  18. int g = 500; // too large for byte type
  19. char h = 500;
  20. // char i = -500; //char is type for positve numbers only
  21. double p = 3.14;
  22. double o = 3.14e100;
  23. float q = 3.14f;
  24. double r = 3.14e100d; //too large for float type
  25. }
  26. }
Success #stdin #stdout 0.06s 380224KB
stdin
Standard input is empty
stdout
Standard output is empty