J2SE Programming
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
}
e.g.
class abc
{
//code
}
Method Declaration : access_specifier return_type <function_name>(Argument List)
{
//Code to do
}
e.g.
public void doStuff()
{
System.out.println("DoStuff");
}
Variable Declaration : type <variable_name>;
e.g. int a;
Variable Intialization : name=<variable_value>;
e.g. a=10;
Object Creation : type <reference_name>=new type(Arg List);
abc a1=new abc();
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
}
e.g.
class abc
{
//code
}
Method Declaration : access_specifier return_type <function_name>(Argument List)
{
//Code to do
}
e.g.
public void doStuff()
{
System.out.println("DoStuff");
}
Variable Declaration : type <variable_name>;
e.g. int a;
Variable Intialization : name=<variable_value>;
e.g. a=10;
Object Creation : type <reference_name>=new type(Arg List);
abc a1=new abc();
0 comments:
Post a Comment