Hi All, i have a method that returns string value and i want to use this string in the switch case. I tried using enum but it is not available in JAVA 1.4. can anbody suggest something.
As far as I know You Can find tricky sought of Questions at Danch following Link:
http://www.danchisholm.net/july21/ And along with that Play RANCHROUNDUP there you can find ample of tricky Question. TRY TO BE MORE ALERT THEN U UsUALLy DO No TRICK Can BoGle You...
Output: false,true false,true true,true,true whether according to me Output: false,true false,true false ,true,true which is coz we r comparing two different object references via == plz elobrate to this...
do'nt you think the answer should be compilation error also coz public method getLeader() is not implemented in concrete class which is must. Thanks & Regards Java Man Deshdeep
do'nt you think the answer should be compilation error also coz public method getLeader() is not implemented in concrete class which is must. Thanks & Regards Java Man Deshdeep
According to me the Output should be:false,true,true.becoz valueOf(); method is just another way to construct wrapper object,and when we compare two different object references it returns false.While the idea i have got from the explanation of Question is their is a huge difference between saying: But Still the thing left dangling is,is'nt both the objects are different. plz elobrate on to this as soon as possible.
you both are great help to understand this concept but if we look to this method its not returning anything,so this could also be a reason as well.Please do correct me if I am thinking wrong.
Hi Buddy Srinivasa Raghavan When I assigned String x = "null"; the Output is :null null does this mean that in case when we say String x="null"; reference variable x value does'nt have any spaces while saying String x=null; does have space.Plz elaborate on this...
Hi Buddy Srinivasa Raghavan When I assigned String x = "null"; the Output is :null null does this mean that in case when we say String x="null"; reference variable x value does'nt have any spaces while saying String x=null; does have space.Plz elaborate on this...