What is the O/P of the below Code Snippet ? And how does it imply the concept of call-by-value/call-by-reference.
(Note : Pls ignore syntx errors)

public class One {
sop ("Into One--");
}
public class Two extends One{
sop ("Into Two--");
}
public class Home {
One a; Two t;
public static void main(argv[])
{
sop ("In Home--");
sop(One.a);
sop(Two.a);
sop(One.t);
sop(Two.t);
}
}

Answers were Sorted based on User's Feedback



What is the O/P of the below Code Snippet ? And how does it imply the concept of call-by-value/call-..

Answer / pokuru surendra

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
One.a cannot be resolved
Two.a cannot be resolved
One.t cannot be resolved
Two.t cannot be resolved

Is This Answer Correct ?    2 Yes 0 No

What is the O/P of the below Code Snippet ? And how does it imply the concept of call-by-value/call-..

Answer / guest

/.kt

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

What is an abstract method?

1 Answers  


Can I import same package/class twice? Will the jvm load the package twice at runtime?

1 Answers  


What is the difference between the session.get() method and the session.load() method?

1 Answers  


Explain bind(), rebind(), unbind() and lookup() methods?

1 Answers  


Why is main purpose of XML?

5 Answers  


list the types of dialodg

1 Answers   Wipro,


How to pass parameters in RMI?

1 Answers  


What is chat area? Explain.

1 Answers  


Can I use javascript to submit a form?

1 Answers  


how the mapping can be done from jsp to actionservlet?

2 Answers   SolutionNET,


Where we can write Rmi registry in the code, without having to write it at the command prompt?

1 Answers  


What is RMI and what are the services in RMI?

1 Answers  


Categories