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...


Can you explain the usages of class.forname()?



Can you explain the usages of class.forname()?..

Answer / Aprajita Devi

The `Class.forName(String className)` method in Java is used to load a class described by its fully-qualified name (class name including package name) at runtime. This method can be useful for dynamic class loading or when using external JAR files.nnFor example:nn```javanClass myClass = Class.forName("mypackage.MyClass");nObject obj = myClass.newInstance();n``` Replace `mypackage.MyClass` with the fully-qualified name of your class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is floor in java?

1 Answers  


What is the use of static methods?

1 Answers  


What is the purpose of using break in each case of switch statement?

1 Answers  


What will happen to the exception object after exception handling?

1 Answers  


What is the static method?

1 Answers  


Iterator in the HashMap is fail-safe means what?

9 Answers   CTS, IBM, Subex,


What is the life cycle of Thread ?

12 Answers   HCL, Varnar Softech,


Can we override tostring method in java?

1 Answers  


When do we use hashset over treeset?

1 Answers  


What are class members by default?

1 Answers   Hexaware,


How u dubugg ur project?

1 Answers   iFlex,


How will you invoke any external process in java?

1 Answers  


Categories