what is difference between class and object?

Answer Posted / patel hemangi baldevbhai

class is collection of object.
ex:
|ob1|ob2|ob3|

object is collection of data member & member function.
ex:
| data | member |
| member | function |

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you generate random numbers in java?

519


What is a flag variable?

557


What is the purpose of static methods and static variables?

543


Can list have duplicates in java?

523


What are the 4 types of research methods?

515






Is there any limitation of using inheritance?

571


How do I enable java in safari?

549


What is string [] java?

530


Implement a stack with push (), pop() and min() in O(1) time.

636


How big is a 32 bit integer?

526


How many ways can we create singleton class?

506


What is variable declaration and definition?

543


Can sleep() method causes another thread to sleep?

567


Is finalize() similar to a destructor?

550


What is float in java?

564