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

Is null a value?

551


What's the base class of all exception classes?

556


Describe how to implement singleton design pattern in struts.

523


Explain the transient field modifier?

556


What is the difference between stream and buffer?

507






What is java’s garbage collected heap?

523


how are methods defined?

547


how to run ecllipse with jettyserver for windows environment using batch file

1482


What are recursive functions?

567


What is the collections api?

564


What are synchronized methods ?

606


What is the inheritance?

540


Explain about strings in java?

606


23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an tag?. code,height & width. 26. What does 'CODEBASE' in an applet tag specify?. Files absolute path.

2050


What are the different approaches to implement a function to generate a random number?

559