What is the result?

Given:

What is the result?

Given:

What is the result?

A.
sc: class.Object
asc: class.AnotherSampleClass

B.
sc: class.SampleClass
asc: class.AnotherSampleClass

C.
sc: class.AnotherSampleClass
asc: class.SampleClass

D.
sc: class.AnotherSampleClass
asc: class.AnotherSampleClass

Explanation:
Note: The getClass method Returns the runtime class of an object. That Class
object is the object that is locked by static synchronized methods of the represented class.
Note: Because Java handles objects and arrays by reference, classes and array types are known
as reference types.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Daniel Reis

Daniel Reis

Question 8 is equal.