DEV Community

AmalaReegan
AmalaReegan

Posted on

Day3 Class and object in java:

CLASS:

*.A class in Java is a blueprint or template for creating objects
*.It defines the properties (attributes) and behaviors (methods) that the objects created from it will have
*.A class encapsulates data for the object and methods to manipulate that data

OBJECT:

*.An object is an instance of a class
*.It is created from the class blueprint and holds actual values in its fields (attributes)
*.Objects can access the methods of the class to perform actions
*.You can create an object by using the new keyword, which calls the constructor of the class to instantiate an object

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay