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 are examples of modifiers?
What is public static?
What is a variable and constant?
What are user defined exceptions?
What is the difference between Array and Hash Table?
What is the difference between a choice and a list?
Define an applet in java?
How do you print array in java?
How do you sort in descending order in java using collections sort?
What is java in simple terms?
What is class and object in java?
What is reverse function?
What interface is extended by awt event listeners?
Can a main method be declared final?
How do you check if a character in a string is a digit or letter?