As we know there are three types of programming we can do in Java. One is Console Based, second is Window Based and third one is Web-Based.
We start firstly with Console based.
Before Actual working, I tell some syntax used in java
Class syntax : class <class_name>
//code to do
Method Declaration : access_specifier return_type <function_name>(Argument List)
//Code to do
public void doStuff()
Variable Declaration : type <variable_name>;
e.g. int a;
Variable Intialization : name=<variable_value>;
Object Creation : type <reference_name>=new type(Arg List);
abc a1=new abc();