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 does string [] args mean?
What is the collections api in java programming?
What are keywords give examples?
What does || mean in code?
Explain about arraylist?
Can static methods access instance variables in java?
What are the important features of Java 11 release?
What is console based application in java?
What is jar?
What are different types of classloaders?
What is final?
Can we declare a class as static?
What is array sorting in java?
Which is fastest collection in java?
What is the difference between static binding and dynamic binding?