fork download
  1. class Base{
  2. public Base() {
  3. }
  4. void demo (int a){
  5. System.out.println ("a: " + a);
  6. }
  7. void demo (int a, int b){
  8. System.out.println ("a and b: " + a + "," + b);
  9. }
  10. double demo(double a) {
  11. System.out.println("double a: " + --a);
  12. return a*a;
  13. }
  14. }
  15. class Test{
  16. public static void main (String args []){
  17. Base Obj = new Base();
  18. double result;
  19. Obj.demo(10);
  20. Obj.demo(10, 20);
  21. result = Obj.demo(5.5);
  22. System.out.println("O/P : " + ++result);
  23. }
  24. }
Success #stdin #stdout 0.12s 50948KB
stdin
Standard input is empty
stdout
a: 10
a and b: 10,20
double a: 4.5
O/P : 21.25