File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes classes & objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "classes & objects" Watch "classes & objects" New topic

classes & objects

Bharat Reddy ALLA

Joined: Jun 20, 2008
Posts: 7
What is the difference between classes and objects in core java?
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

This is a class

Class X

The following code creates an object of class X in the JVM memory

X x = new X();

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Sunny Jaiswal

Joined: Feb 01, 2008
Posts: 14
To start with, think of class as an "Idea", it is something that is different from others and has a unique behavior, it can be a person, an aircraft or anything else. The objects are just the example of that given idea, like you and me or a Sukhoi-30. In other words, a class is a blueprint from which objects are constructed. The objects represents the particular instance of that class, like people belonging to the same city, and the aircraft's produced of a given type.

Preparing for SCJP...
I agree. Here's the link:
subject: classes & objects
It's not a secret anymore!