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
Who is java developer?
What is business method?
What does resource adapt module contain?
What is difference between java and core?
Is java is fully object oriented?
What is non primitive data type in java?
What is element?
What are the differences between Ear, Jar and War files? Under what circumstances should we use each one?
What is ejb container provider?
What is java developer?
Describe action form?
What is java naming and directory service?
What is javamail?
What is Document Object Model?
What are java front end tools?