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

How to deploy Jar, War files in J2EE?

0 Answers   HCL,


why we use main in java?

4 Answers  


What is the difference between a stub and a skeleton?

9 Answers   ABC, College School Exams Tests, Geoservices, Polaris, Qualcomm, Rajiv Gandhi College of Engineering and Technology RGCET, UTIITSL, Wipro,


What is RRL?

1 Answers  


what's the main difference between unix os and linux os?

2 Answers   TCS,






What is JNI?

1 Answers   Google, TCS,


What is waiting state? In what ways a thread can enter into waiting state?

2 Answers   Wipro,


What is the relationship between the canvas class and the graphics class?

0 Answers  


What are the different class loaders used by jvm?

0 Answers  


What are the benefits of detached objects?

0 Answers  


What is the purpose of the wait() method?

0 Answers  


Describe, in general, how java's garbage collector works?

0 Answers  


Categories