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 j2ee components?
What is ejb container provider?
What is the use of method saveorupdate()?
Describe the ear, war, and jar.
What is component in java with example?
Hi Friends. I want complete technical flow of j2ee project with following technologies. jsp , servlet , Struts , Hibernate , (should follow mvc-2 design pattern) . with DAO ,DTO SERVICE layers .
What is a j2ee module?
What is java web technologies?
What type of code is java?
What is j2ee tutorial?
What do you mean by the component contract?
What are the component of java?
What is multi tier architecture in j2ee?
What is create method?
What is ear file?