How is object created in java?

Answer Posted / javamasque

Object is created in four different ways
1. Using new operator
2. Class.forName(..)
3. Cloning
4. Serializing and De-serializing

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you compare objects in java?

503


Explain serialization and deserialization in java?

555


Why do we create threads in java?

584


Why is stringbuffer not immutable?

570


In case of inheritance what is the execution order of constructor and destructor?

642






Is final static java?

553


What is finally and finalize in java?

594


What is the difference between compare and compareto in java?

491


How will you compute size of a structure?

590


a thread is runnable, how does that work? : Java thread

513


Explain the difference between abstract class and interface in java?

541


Explain exception chaining in java?

611


How we create object in copy constructor?

648


what is synchronization and why is it important? : Java thread

588


What is the meaning of flag day?

545