Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why map is used in java?

1090


Can we create an object of private class?

1025


What does sizeof return?

1038


What is singleton class and how can we make a class singleton?

1157


What is a functional interface?

1096


What are some characteristics of interference class?

1062


How many tetrahedral voids are there in bcc?

1179


What is an object in java?

1096


How do you test a method for an exception using junit?

1271


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread

1093


What are the restrictions imposed by a Security Manager on Applets?.

2654


What is java util hashmap?

1035


What is return keyword in java?

1111


If a class is declared without any access modifiers, where can the class be accessed?

1109


Can sleep() method causes another thread to sleep?

1083