0

What is the definition of a Class , Object and an Instance and what is the difference between an Instance and an Object.

I would like my answer in Simple English

1

1 Answer 1

0

Class is collection of various objects, variables, functions etc.

class DemoClass { void method(){ ...... } } 

When you want to create a new instance of a class you need to create a new object of that class.

DemoClass dc = new DemoClass(); 

You can then access this instance (methods etc. of this instance) from the object you created.

dc.method(); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.