UrbanPro
true

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Definition of Class and Object in Java

Devendra V
02/04/2018 0 0

Object - Objects have states and behaviors. Example: A dog has states - colour, name, breed as well as behaviors - barking, eating, sleeping. An object is an instance of a class.


Class - A class can be defined as a template/blueprint that describes the behaviours/states that object of its type support.

 
Sample of a Class
public class Dog{
   String breed;
   int ageC
   String color;

   void barking(){
   }
   void eating(){
   }
   void sleeping(){
   }
}
Creating an Object
Dog obj = new Dog()
0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

Class, Object and Methods in JAVA
Lesson-1: Class, Object and Methods of Java can be compared with body, heart and brain. Without these 3 things, Java does not exist. If you Google the above 3 items, you will find many definitions. But...

Software Testing
Software testing is a process of executing a program or application with the intent of finding the software bugs. It can also be stated as the process of validating and verifying that a software program...

Big Data Hadoop Training
What is Big Data? Big data means really a big data, it is a collection of large datasets that cannot be processed using traditional computing techniques. Big data is not merely a data, rather it has become...

10 Cool SQL Optimizations That Do Not Depend On The Cost Model
Today, we don’t want to talk about cost based optimisation, i.e. optimisations that depend on a database’s cost model. We’ll look into much simpler optimisations that can be implemented...

Java Overview
Java platform overview Java platform components The Java platform consists of the following components. The Java language Like any programming language, the Java language has its own structure, syntax...
A

Akshay Shende

0 0
0
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more