what are the uses of Class class and what it returns?
explain it with the example code.

Answer Posted / santhosh kv

we can use class "Class" for dynamic class loading.

ie Class.forName("classname");

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why packages are used?

548


What is the statements?

595


What is replacefirst in java?

578


Why is string class considered immutable?

598


How to check if linked list contains loop in java?

459






What is the difference between && and & in java?

575


what is thread? What are the high-level thread states? : Java thread

794


How can you make a class serializable in java?

569


What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?

592


What occurs when an object is constructed?

575


What is the difference between variable & constant?

547


When does an object becomes eligible for garbage collection in java?

585


How do you add an element to an arraylist in java?

492


In Java list the methods that can be overridden?

575


What is the difference between processes and threads?

538