what is difference between class and object?
Answer Posted / ovn
•class is collection of objects.object is a real world
entity.
Class is template for an object and object is a instance of
a class.
•Class defines object but object cannot define a classes.
•Class cannot be passed as a parameter or arguments, but
object can be passes as parameter or argument.
•Object should be belonging to any of class.
•Object can create or delete as your necessity.
•Attributes and behaviors of class can access with the help
of objects.
attribute and beheviours of class can access with the help
of objects.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is multi-catch block in java?
Write a program in java to create a doubly linked list containing n nodes.
Give few examples of final classes defined in Java API?
What is instance means in java?
How to calculate the length of a singly linked list in java?
Is java call by reference?
Why do we need data serialization?
Compare java and python.
What is the difference between comparison done by equals method and == operator?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
How to find the largest value from the given array.
What are format specifiers in java?
Say any two properties in beans?
How do you sort a list in java?
What is hashset in java?