public class Exampleprg {
Exampleprg(String... person){
for(String name: person){
System.out.println("Hello " + name);
}
}
public static void main(String args[]){
Exampleprg("john","david", "suhel");
}
}
It tells "Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method Exampleprg(String, String, String) is undefined for the type Exampleprg
at Exampleprg.main(Exampleprg.java:9)"

New Topic/Question
Reply



MultiQuote






|