

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How many ways can get the instance of a Class class in Java?
You can create an object of the class named Class in two ways −
Using new keyword as −
Class obj = new Class();
Using the forName() method of the class named Class.
Class obj = Class.forName("DemoTest");
- Related Questions & Answers
- How many ways are there to initialize the instance variables of a class in java?
- How to get the class name of an instance in Python?
- In how many ways you can retrieve the elements of a collection in Java?
- When can a .class file get created in Java?
- Get the unqualified name of a class in Java
- How many ways a String object can be created in java?
- The get() method of Java AbstractSequentialList class
- In how many ways we can concatenate Strings in Java?
- Class with a constructor to initialize instance variables in Java
- The get() method of AbstractList class in Java
- How many ways can we read data from the keyboard in Java?
- Get the fully-qualified name of a class in Java
- Class & Instance Attributes in Python
- How many destructors can we have in one class in C#?
- Can private methods of a class be accessed from outside of a class in Java?
Advertisements