public class CDummy
{
static int toto = 7;
CDummy getDummy() {
return null; // pay attention here !
}
public static void main(String args[])
{
System.out.println("CDummy.");
CDummy dmy = new CDummy();
System.out.println(dmy.getDummy().toto);
}
}
can you guess the output of the above code ? (try not to run the code)
plz replay me....
hii
ReplyDeleteMy answer is 0..
is it wrong...????
@vishal Joshipura:yes is it wrong...
ReplyDeleteNULL 7
ReplyDelete@niks2989 : you had given ans is wrong
ReplyDelete@Parag Shukla : yes sir right......
ReplyDeletenow i m saying right ans is 7... now tell me how... (except parag sir's replay)
ReplyDelete