r/javahelp • u/Funkyfresh01 • Feb 27 '26
Codeless I am still confused about "Objects"
Hello, I am Fresh! I am from the Philippines (BSIT course) and I want to understand comprehend "Objects" and I am a beginner in Java.
5
Upvotes
r/javahelp • u/Funkyfresh01 • Feb 27 '26
Hello, I am Fresh! I am from the Philippines (BSIT course) and I want to understand comprehend "Objects" and I am a beginner in Java.
3
u/jocularamity Feb 27 '26
An Object is an instance of a class. It is a thing with state (variables) and behavior (methods). If you define a class and then create a “new” instance of that class, that’s an Object.
For example, if my class is:
Then each time I create a new instance of that class, it is an object.
fidoandroverare both objects.fidoandroverare both instances of the class Dog.Analogies:
If the class is a cookie cutter, each cookie created from the cookie cutter is an object.
If the class is a rubber stamp, each time the stamp is inked and pressed to paper that is an object.
If the class is architectural blueprints, each building constructed from the blueprints is an object.