Java Error: ')' expected -
system.out.println("enter department name:"); string firstdepartment = bufread.readline(); system.out.println("enter number of employees:"); val1 = double.parsedouble(bufread.readline()); system.out.println("enter cost per employee:"); val2 = double.parsedouble(bufread.readline()); system.out.println("enter sales:"); val3 = double.parsedouble(bufread.readline()); system.out.println("hello, donaldio! " + firstdepartment + "profit " "$" + (val3 - val1 * val2)); string pleasecontinue = bufread.readline(); system.out.println("please press enter!");
this 1 part of code. unfortunately, command prompt keeps telling me there's error @
system.out.println("hello, donaldio! " + firstdepartment + "profit " "$" + (val3 - val1 * val2));
it says there's ')' expected. understand means, can't find parentheses missing... i'm confused. appreciated!
you missed +
sign in between
"profit " "$" ^
based on logic, think don't mean include double quotes:
"profit $"
Comments
Post a Comment