fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.io.*;
  4.  
  5. /* Name of the class has to be "Main" only if the class is public. */
  6. class Ideone
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. String a = "The Java Add And Multiply Program.";
  11. System.out.println(a);
  12. int b = 25;
  13. int c = 25;
  14. int d = (b + c);
  15. System.out.println(b + " " + c + " " + d);
  16. int e = 45;
  17. int f = 45;
  18. int g = (e * f);
  19. System.out.println(e + " " + f + " " + g);
  20. }
  21. }
Success #stdin #stdout 0.13s 55876KB
stdin
1
2
10
42
11
stdout
The Java Add And Multiply Program.
25 25 50
45 45 2025