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
What are struts?
What is DDP?
Is visual studio good for java?
Difference between save and saveorupdate?
What is data?
What software is needed for java programming?
What is the difference between load() and get()?
What is considered as a web component?
What is java developer?
What is container-managed persistence?
What is ejb module?
What is sandbox in java?
What is a web container in j2ee?
What is actionform?
What is pure java?