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. // your code goes here
  13. }
  14. }
  15. var orderCount = 0
  16. function takeOrder(topping, crustType){
  17. console.log("Order: "+ crustType + " pizza topped with " + topping)
  18. orderCount = orderCount + 1
  19. }
  20.  
  21.  
  22. takeOrder("bacon", "thin crust")
  23. takeOrder("hawiaan", "thin crust")
  24. takeOrder("dead cat", "thin crust")
  25.  
  26. console.log(orderCount)
  27. function getSubTotal(itemCount){
  28. return;itemCount*7.5
  29. }
  30. /*var money = orderCount*7.5
  31. console.log(money)*/
  32. console.log(getSubTotal(orderCount))
  33. function getTax (){
  34. return;getSubTotal(orderCount)*0.06
  35.  
  36. }
  37. function getTotal(){
  38. return; getTax()+getSubTotal(orderCount)
  39. }
  40. console.log(getTotal())
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:15: error: class, interface, or enum expected
var orderCount = 0
^
Main.java:28: error: class, interface, or enum expected
  return;itemCount*7.5
         ^
Main.java:34: error: class, interface, or enum expected
  return;getSubTotal(orderCount)*0.06
         ^
Main.java:38: error: class, interface, or enum expected
  return; getTax()+getSubTotal(orderCount)
          ^
4 errors
stdout
Standard output is empty