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 Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. //declarations
  13. Scanner userInput = new Scanner(System.in);
  14. String quit = "quit";
  15. boolean on = true;
  16.  
  17. //declaring array
  18. String[] outcome = new String[5];
  19. outcome[0] = "";
  20. outcome[1] = "Yoga 1";
  21. outcome[2] = "Yoga 2";
  22. outcome[3] = "Children's Yoga";
  23. outcome[4] = "Prenatal Yoga";
  24. outcome[5] = "Senior Yoga";
  25. while (on)
  26. {
  27. int theAnswer = number.nextInt(5);
  28. System.out.println("Please enter class number");
  29. System.out.println(outcome[num]);
  30. }
  31. }
  32. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:27: error: cannot find symbol
			int theAnswer = number.nextInt(5);
			                ^
  symbol:   variable number
  location: class Ideone
Main.java:29: error: cannot find symbol
			System.out.println(outcome[num]);
			                           ^
  symbol:   variable num
  location: class Ideone
2 errors
stdout
Standard output is empty