fork download
  1. import java.util.Random;
  2.  
  3.  
  4. public class MathTest
  5. {
  6. public static int genRandom()
  7. {
  8. return new Random().nextInt(9-0) + 0;
  9. }
  10. public static void main(String[] a)
  11. {
  12. while(true)
  13. {
  14. Math m=new Math(genRandom(), genRandom());
  15. m.menu();
  16. }
  17. }
  18. }
  19.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:4: error: class MathTest is public, should be declared in a file named MathTest.java
public class MathTest 
       ^
Main.java:14: error: constructor Math in class Math cannot be applied to given types;
			Math m=new Math(genRandom(), genRandom());
			       ^
  required: no arguments
  found: int,int
  reason: actual and formal argument lists differ in length
Main.java:15: error: cannot find symbol
			m.menu();
			 ^
  symbol:   method menu()
  location: variable m of type Math
3 errors
stdout
Standard output is empty