Wednesday, July 16, 2008

Java question for interview

Q.1 Will the following code be complied without error?
float f=3.0
Q.2 What will be the output if following is typed on command line?
java myprog good morning
public class myprog{ 
public static void main(String argv[])
{ 
System.out.println(argv[2]) ;
}
}

0 comments: