what is difference between class and object?

Answer Posted / deepak

class is a collection of its instance members like
variables and method. Objects are declared in the class.
Objects are nothing but a entity which keeps the refrence.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to sort double array in java?

587


Is a string literal?

524


What is the default execution method in java?

623


What is an exception in java?

646


What is the difference between a synchronized method and a synchronized block?

605






What is the difference between equals() and == in java?

526


How do you read and print a string in java?

523


What are constants and how to create constants in java?

556


Can we have two main methods in a java class?

538


How to sort numbers in java without array?

529


FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?

2633


What are the two types of exceptions in java? Which are the differences between them?

511


What are the different types of inheritance in java?

529


What are the different types of garbage collectors in java?

545


What is the purpose of default constructor?

579