fork download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Main
  5. {
  6.  
  7. public static double calc(int v1) {
  8. return v1 / 2 + 1.5;
  9. }
  10.  
  11.  
  12. public static double cald (double v) {
  13. return v / 2 + 1.5;
  14. }
  15.  
  16. public static void main (String[] args) throws java.lang.Exception
  17. {
  18. System.out.println(calc(1));
  19. System.out.println(cald(1.0));
  20. }
  21. }
Success #stdin #stdout 0.04s 213440KB
stdin
Standard input is empty
stdout
1.5
2.0