Classes and Objects Tutorials
In Java, a class serves as a template for an object, an instance of that class. A
class encapsulates certain behaviors and state. The tutorials on this page focus on performing various
tasks on Java classes and objects, often involving reflection.
-
What's a quick way to output the fields of an object?
-
How do I instantiate an object of a class via its String name?
-
How do I determine the class name of an object?
-
How do I list the declared methods of a class?
-
How do I list the public methods of a class?
-
How do I call a method using reflection?
-
How do I call a declared method using reflection?
-
How do I list the declared fields of a class?
-
How do I list the public fields of a class?
-
How do I get and set a field using reflection?
-
How do I get and set a declared field using reflection?
-
How do I list the constructors of a class?
-
How do I create an object via its multiparameter constructor using reflection?
-
What is the instanceof operator and how do I use it?
|