Java program is an object-oriented programming language, that means java is the collection of objects, and these objects communicate through method calls to each other to work together. Here is a brief discussion on the Classes and Objects, Method, Instance variables, syntax, and semantics of Java.
Basic terminologies in Java
1. Class: The class is a blueprint (plan) of the instance of a class (object). It can be defined as a logical template that share common properties and methods.
Example1: Blueprint of the house is class.
Example2: In real world, Alice is an object of the “Human” class.
2. Object: The object is an instance of a class. It is an entity that has behavior and state.
Example: Dog, Cat, Monkey etc. are the object of “Animal” class.
Behavior: Running on the road.
3. Method: The behavior of an object is the method.
Example: The fuel indicator indicates the amount of fuel left in the car.
4. Instance variables: Every object has its own unique set of instance variables. The state of an object is generally created by the values that are assigned to these instance variables.
Example: Steps to compile and run a java program in a console


