Who Knows All.. ?

If the answer is No one. Then this blog is for U. I'm going to put all the things I know in Java

What is a Class?

(For these type of questions don’t just say “A class is a blueprint for an object”.Elaborate the answer. Thus u can gain impression of the interviewer)

A class is a blueprint for an object. A class is used to construct an object.It tells the virtual machine how to make an object of that particular type.Each object made from that class can have its own values for the instance variables of that class.For example,you might use the Button class to make dozens of different buttons,and each button might have its own color,shape,label,and so on.So, a class is not an object but it is used to construct them.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


This entry was posted on November 2, 2011 by in What is a Class.
%d bloggers like this: