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

Is eclipse written in java?

711


What is cmp in j2ee?

659


What is caller?

743


What is ejb jar file?

645


What is a component in java?

639


What are the advantages of object-relational mapping (orm)?

664


What is pure java?

727


How do I run java?

627


What is a web container j2ee?

672


What are the main components of multi-tier architecture?

681


What is full form of j2ee?

711


What are the j2ee technologies?

656


What is conversational state?

712


What is context root?

724


Who is java developer?

679