Thursday, July 9, 2009

Java Challenge can anybody solve ?

Fill in the underline to get the answer as "Book".


________ Grade { A { ______ }, B,C,D};


public class EnumTest {


public static void main(String[] args)


{


Grade grade = ____________;


switch(grade) {


case ________ :


System.out.println(grade);


default :


System.out.println("Default");


}


}


}





--------------------------------------...


Code Hints : Enum


public String toString () { return "Book";}


return "Book"


"Book"


enum


A


Grade.A








______________________________________...





You have to use the Code hints in the underline spaces.

Java Challenge can anybody solve ?
enum


public String toString() { return "Book";}


"Book"


A





That's my guess.
Reply:you got me

free survey

No comments:

Post a Comment