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. // class Student {
  9. // private String name;
  10.  
  11. // public String getName() {
  12. // return name;
  13. // }
  14.  
  15. // public void setName(String name) {
  16. // this.name = name;
  17. // }
  18. // }
  19.  
  20. // abstract class Animal {
  21. // abstract void makeSound();
  22. // void nothing(){
  23. // System.out.println("nothing");
  24. // }
  25. // }
  26.  
  27. // class Dog extends Animal{
  28. // @Override
  29. // void makeSound() {
  30. // System.out.println("Meow!");
  31. // }
  32. // void nothing(){
  33. // System.out.println("nothing part 2");
  34. // }
  35. // }
  36.  
  37. // class Parent {
  38. // String name = "Sachit";
  39. // }
  40.  
  41. // class Child extends Parent {
  42. // public void print() {
  43. // System.out.println(name);
  44. // }
  45. // }
  46.  
  47. // class Addition {
  48. // public int add(int a, int b) {
  49. // return a + b;
  50. // }
  51. // public int add(int a, int b, int c) {
  52. // return a + b + c;
  53. // }
  54. // public double add(double a, double b) {
  55. // return a + b;
  56. // }
  57. // }
  58.  
  59. class Ideone
  60. {
  61. public static void main (String[] args) throws java.lang.Exception
  62. {
  63. // Student obj = new Student();
  64. // obj.setName("Sachit");
  65. // System.out.println(obj.getName());
  66. // Animal obj = new Dog();
  67. // obj.makeSound();
  68. // obj.nothing();
  69. // Child obj = new Child();
  70. // // obj.print();
  71. // Addition obj = new Addition();
  72. // System.out.println(obj.add(5.0, 10.2));
  73. }
  74. }
Success #stdin #stdout 0.08s 52628KB
stdin
Standard input is empty
stdout
Standard output is empty