Introducing programming structure of JAVA
·
Basically we are learning java through
programming but for understanding we are defining some terms in Java.
·
So starting small history Java was developed in
1995 by James Gosling and three more
at Sun Micro systems but now it is
owned by Oracle Corporation.
·
Now starting with our programming manner
structure of Java Program…
Structure of
JAVA Program
//Program for
test
Import
java.lang.*;
Class Test
{
/**
@author Student
**/
public static void main(String
argd[])
{
System.out.println(“---------Test----------”);
}
}
Starting with
every programming language we have seen ‘Hello
World’ program but behind every program what actually is we will be looking
for that.
Now in above
program,
·
“//”
Comments
·
“import”
is keyword.
·
“java” is package.
·
“lang”
is sub package
·
“*” represents
all classes and interfaces in that package
·
“Class” is
also keyword.
·
“Test” is identifier(Name of class).
·
“ public“
is access modifier.
·
“static “
is modifier.
·
“void“ is
return type of main method.
·
“String” is
predefined class.
·
“args[]“ is
array of object reference.
·
“System”
is library class.
·
“out” is
object reference.
·
“println”
is predefined method.
·
“-------Test---------”
is string literal.
So this is only we have introduced in
program what is but what is actual functionality of each we will be learning in
next sessions…

0 comments: