How to create an instance of a class without using "new"
operator? Plz help me out properly.Thank u.

Answer Posted / abhishek thakur

1. Four Ways of Object creation

i)Using "new" operator
ii)Using newInstance Method in Class.forName(class name)
iii)in case of deserialisation
iv)using clone

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where are the card layouts used?

811


Difference between Preemptive scheduling vs. Time slicing?

782


Is null keyword in java?

719


What is the difference between synchronized and synchronized block?

782


What is a war file?

743


How many static init can you have?

902


What is the parse method in java?

785


What are the ways in which a thread can enter the waiting state?

701


Why are arrays useful in java?

760


Why is core java important?

773


What is a method in java?

718


What is meant by data hiding/encapsulation?

801


What are the application of stack?

676


Is null a string or object in java?

725


Describe how to implement singleton design pattern in struts.

762