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

What are j2ee components?

450


What is ejb container provider?

456


What is the use of method saveorupdate()?

547


Describe the ear, war, and jar.

520


What is component in java with example?

485






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 .

4399


What is a j2ee module?

528


What is java web technologies?

489


What type of code is java?

514


What is j2ee tutorial?

500


What do you mean by the component contract?

509


What are the component of java?

459


What is multi tier architecture in j2ee?

460


What is create method?

578


What is ear file?

536