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
Which eclipse is best for java?
What is stack example?
Can anonymous class have constructor?
What are the types of methodology?
What are new features introduced with java 8 ?
How many java versions are there?
What is main difference between variable and constant?
Which class represents the socket that both the client and server use to communicate with each other?
What is the difference between variable declaration and variable initialization?
which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?
What is the size of boolean variable?
How can I become a good programmer?
What is the difference between multiple processes and multiple threads?
What is method overloading and method overriding?
What is boolean in java?