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 pre increment and post increment in java?
What is the collections api?
What is the old name of java?
What is the difference between Java and C++?
What is a double vs float?
What do you mean by chromounits in java8?
How do weakhashmap works?
Is there any case when finally will not be executed?
What are java packages?
What is final method?
What are the limitations of procedural programming approach?
What is the difference between preparedstatement and statement in java?
How destructors are defined in java?
What is anonymous inner class?
How infinite loop is declared?