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
Is eclipse written in java?
What is cmp in j2ee?
What is caller?
What is ejb jar file?
What is a component in java?
What are the advantages of object-relational mapping (orm)?
What is pure java?
How do I run java?
What is a web container j2ee?
What are the main components of multi-tier architecture?
What is full form of j2ee?
What are the j2ee technologies?
What is conversational state?
What is context root?
Who is java developer?