There are 2 different ways to create an object. a)By using
keyword "new" b)By using Class.forName
("className").newInstance();
What is the difference between these 2 methods.
Answer Posted / ratnesh gupta
the first way to create an object is 'class name object
name'and the secondone is classNameAsArgument").newInstance
();
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What is null in java?
What is default constructors?
Is java code slower than native code?
What is java string pool?
Tell us something about set interface.
What is the use of default method in interface in java? Explain
There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?
Is oracle java 11 free?
What is difference between pointer and reference?
What is the use of volatile in java?
Difference between arraylist and hashset in java?
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