Friday, 10 May 2013
Constructor - 1 -
You have a public class called myclass with the main method defined as follows
package net.dharmaraj;
public class dev {
public static void main(String parm[]) {
System.out.println(parm.length);
System.out.println(parm[1]);
}
}
If you attempt to compile the class and run the program as follows
java myclass hello
What will happen?
1) Compile time error, main is not correctly defined
2) Run time error, main is not correctly defined
3) Compilation and output of java
4) Compilation and output of hello
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment