Whats the O/p of the below code snippet ? And explain how does it imply the concept of call-by-value/call-by reference. (PS : Pls ignore syntax errors)

public class One {
public oneA(){
sop ("Into One--");}
}
public class Two extends One{
public twoT(){
sop ("Into Two--"); }
}
public class Home {
One a; Two t;
public static void main(argv[])
{
sop ("In Home--");
sop(a.oneA());
sop(t.oneA());
sop(a.twoT());
sop(t.twoT());
}
}

Answer Posted / jitendra

Cannot make a static reference to the non-static field a

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are struts?

516


What is DDP?

541


Is visual studio good for java?

494


Difference between save and saveorupdate?

518


What is data?

547






What software is needed for java programming?

460


What is the difference between load() and get()?

553


What is considered as a web component?

562


What is java developer?

474


What is container-managed persistence?

530


What is ejb module?

517


What is sandbox in java?

502


What is a web container in j2ee?

508


What is actionform?

553


What is pure java?

525