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. /* Name of the class has to be "Main" only if the class is public. */
  8.  
  9. class Test
  10. {
  11. void met (int x){
  12. System.out.println("int called");
  13.  
  14. }
  15.  
  16. void met (long x){
  17. System.out.println("long called");
  18.  
  19. }
  20. public static void main(String[] args){
  21. Test t= new Test();
  22. t.met(10);
  23. t.met(10L);
  24. t.met(10D);
  25. t.met(10F);
  26. }
  27.  
  28.  
  29. void met (float x){
  30. System.out.println("float called");
  31.  
  32. }
  33.  
  34. void met (double x){
  35. System.out.println("double called");
  36.  
  37. }
  38.  
  39. }
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
int called
long called
double called
float called