what is difference between class and object?

Answer Posted / maurya

class is a totally logical perseption while we r making a
class we think only WHAT and HOW. but an object is fully
physical perseption when we create an object we get th
physical entity of class. object has its existance but a
class dont.
through WHAT of a class we define state ie. what should be
in my object and through HOW we define behavior of object
ie. how and what function perform on my object to change
its behavior.
an object is actually type of class.....!!

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can finally block be used without a catch?

546


What is collections framework?

578


Why set do not allow duplicates in java?

579


What are the main uses of java?

525


Why we do exception handling in java and how many types of exceptions are there?

547






Why do I need to declare the type of a variable in java?

566


What are the different types of inheritance in java?

529


Can a constructor be private and how are this() and super() method used with constructor?

528


What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?

1936


How dead lock situation occurs in java and how you can identify it?

542


What does the @override annotation do?

563


How can you make sure that your singleton class will always return single instance in multi-threaded environment?

571


What is length in java?

570


What is independent and dependent variables in research?

470


Why 1 is not a prime number?

557