It is any real-world thing that has properties and actions . In other words, an entity that has state and behavior is known as object in Java. Here, state represents properties and behavior represents actions or functionality. For example, book, pen, pencil, TV, fridge, washing machine, mobile phone, etc.
What is object in Java with realtime example?
It is any real-world thing that has properties and actions . In other words, an entity that has state and behavior is known as object in Java. Here, state represents properties and behavior represents actions or functionality. For example, book, pen, pencil, TV, fridge, washing machine, mobile phone, etc.