How is object created in java?

Answer Posted / ishaque

There are many ways to create an object in java. They are:

By new keyword
By newInstance() method
By clone() method
By factory method etc.

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain when we should make an instance variable private.

831


What is a local block?

907


What are decalarations?

862


Can a class extend more than one class?

869


Can we make the abstract methods static in java?

819


What is an example of a conditional statement?

800


What is hash in java?

729


What is super constructor?

767


How to check if linked list contains loop in java?

664


When is the garbage collection used in Java?

916


What is parseint?

739


What are the types of casting?

842


What is finally and finalize in java?

816


How do generics work?

728


Why arraylist is used in java?

783