How to Print Message in Java
100% Working Code and Projects.if you need any help about project and Application Contact Shelly at:+917888361589.
See the code below :-
Java Code :-
public class Hello {
public static void main(String[] args) {
System.out.println("Hello ");
System.out.print("How are you ? ");
}
}
Explanation :-
In first line, we have declared the class name which is public. Public is an access specifier which means that we can access it from any where.
In Second line,
Public
|
Access Specifier which can used any where
again .
|
Static
|
Value or data remain unchanged throughout the program.
|
Void
|
A
data type which does not contain any thing or null.
|
Main
|
A
function which is entry gate of any java program.
|
String
|
It
is a most flexible data type in java.
|
[]
args
|
It
is used because java program is store in array . it is not compulsory that we
have to use args we can take any name or variable.
|
0 Comments:
Post a Comment