+ 2
what happen if I add "main" in "static void sayhello(String name)" as "static void main sayhello(String name)" on the given code
public class FirstCode { static void sayhello(String name) { System.out.print("Hello" + " " + name); } public static void main(String[] args) { sayhello("Sam"); sayhello("Ram"); } }
1 ответ
+ 6
An error.