fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone {
  6. public static int calcSalary(int payment, int hours, int... prize) {
  7. int monthSalary = payment * hours;
  8. monthSalary = monthSalary + prize;
  9. return monthSalary;
  10. }
  11.  
  12. public static void main(String[] args) {
  13. Salary aprilSalary = new Salary();
  14. Salary maySalary = new Salary();
  15.  
  16.  
  17. System.out.println("My salary in April is " + aprilSalary.calcSalary(500, 160, 3000));
  18. }
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:8: error: bad operand types for binary operator '+'
    monthSalary = monthSalary + prize;
                              ^
  first type:  int
  second type: int[]
Main.java:13: error: cannot find symbol
    Salary aprilSalary = new Salary();
    ^
  symbol:   class Salary
  location: class Ideone
Main.java:13: error: cannot find symbol
    Salary aprilSalary = new Salary();
                             ^
  symbol:   class Salary
  location: class Ideone
Main.java:14: error: cannot find symbol
    Salary maySalary = new Salary();
    ^
  symbol:   class Salary
  location: class Ideone
Main.java:14: error: cannot find symbol
    Salary maySalary = new Salary();
                           ^
  symbol:   class Salary
  location: class Ideone
5 errors
stdout
Standard output is empty