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);
}
}

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define prototype?

583


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

540


What do you know about seam?

600


Whats new with the stop(), suspend() and resume() methods in jdk 1.2?

581


What is abstract schema?

553






wahts is mean by dynavalidatorform in struts/

1569


Which container method is used to cause a container to be laid out and redisplayed?

666


Is the session factory thread safe?

673


Explain what is synchronization?

572


What does module-relative mean?

575


What are various types of class loaders used by jvm?

495


Explain the difference between object state and behavior?

565


What is jboss?

571


What are the pros and cons of detached objects?

549


Write a singleton program?

570