When I write:
System.out.println("Give grade: ", args[0]);
It gives the error:
The method println(String) in the type PrintStream is not applicable for the arguments (String, String).
Why is this so? However, when I try to write
System.out.println("Give grade :");
System.out.println(args[0]);
No error shows. Is there a way I can write the above in one line of println()
?