what is java | how to use Java | best Programming Language | how to create a class | java basic syntax | what is syntax | syntax in java

 

         

                      


                           Java Syntax


Sample Code:

----------------------------------------------------------
| class demo                                                |
| {                                                                  |
|    public static void main(String[] args)  |
|   {                                                                |
|        System.out.println("Hello world");  |
|    }                                                              |
| }                                                                 |
---------------------------------------------------------


Explaination:

  • Java is Case sensitive
  • In java all class name are file 
  • That means file name and class names are must be same
  • The class and main functions are should start and end with "{}" curvely praces
  • If You want to print any thing on the Java using the code like "System.out.println()"
  • System.out.println() the " System " S -> is Capital S 
  • All statement ends with semicolon ";"



That all The simple Syntax in Java.


Comments

Popular posts from this blog

java variables | variables in java | what is java | how to use variable in java |

What is java | learn java | learn java in tamil | easy to learn java| how to learn java|examples in java