Tuesday, May 18, 2010

A tricky program 2 to Java Beginners,

Question:- You should bring the output by not modifying the main method,The output is "Great Java Programmer".

class NMM //No main method
{
public static void main(String []args)
{
System.out.println(“Java”);
}
}Seems to be tricky for you right?.Let us see what is answer in the next post..If you know the answer just post as comment or mail to me.

UPDATE: Check out the solution here http://javacoderblog.blogspot.com/2010/06/solution-to-tricky-program-2.html

No comments:

Post a Comment