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 the difference between a checked and an unchecked exception?
What is data object example?
Is sizeof a keyword in java programming?
What happens if I remove static from main method?
What is multithreading and its advantages?
What does the exclamation mark mean in java?
What is static block?
Explain the importance of join() method in thread class?
Can we define private and protected modifiers for the members in interfaces?
What is the size of integer?
Can I overload to string method
What is the maximum size of byte array in java?
What is off heap memory?
Where is core java used?
Does java have extension methods?