19-01-2013, 03:33 PM
Creating a first prog
Creating a first.pptx (Size: 76.31 KB / Downloads: 23)
In the method public static void main(strins[] args)
public is an access modifier.
static means stationary and it ensures that main() is accessible even though no object of the class exists.
void means it does not return any value when it is called.
(string[] args) String represents a java class that can be used to represent character strings.
args used to hold any string that might be sent to the main() method
Running a java prog.
To compile source code from command line. Type javac followed by file name in command line.
Data Types in Java….
Java supports 8 type of data types…..
Boolean
Float
Byte
Int
Char
Long
Double
Short
Declaring Variables…
A variable declaration must include following.
Data type
An valid variable name.
An assigning value.
And semicolon at the end.
For Example: int Age=25;
For integers type we can store only integers.
Range is -2147483648 to +2147483647.