Syntax of Java Programming Language.

 Hello Guys 🤙

In our previous blog we covered the basics of Java programming language.

Today we will seen the syntax of Java programming language.


Java Programming Language Basic Syntax
"Syntax"
import java. io. *;

class HelloWorld { 

public static void main(String args[ ] ) {

System.out.println("Hello,World!");

  }
}

"Output"
Hello,World

public: A Java keyword that indicates the visibility of the class or Method. Public Means the class or Method Can be Accessed from anywhere.


class: A Java Keyword Used to Define a class.


HelloWorld: The Name of the class, which must be the Same as the Name of the File (with a .java extension) that the class is Defined in.


{}: Braces are Used to Define a Block of code. In this case, the Block of code is the entire class.


static: A Java keyword that Indicates that a Method or Variable Belongs to the class itself, rather than to Any Specific Instance of the class.


void: A Java Keyword used to Indicate that a Method Does Not return a value.


main: The Name of the Method, which is the Entry Point for the Program.


String[] args: A Parameter of the main method that is an array of strings.


System.out.println: A Method call that Prints the Specified message to the Console and adds a newline character at the end.


"Hello, world!": A String literal that Represents the Message to be Printed. The String is enclosed in double quotes
.


If You Want to Know more Java Programming language - 
So Click This Link 👇

If You Want to Know About CSS Language and It Web Design, then Click This Link 👇

can you want to see the privacy policy of this page then click on this link 👇



Hope You have understood the Basic Syntax of java programming language we read in today's article, if you like the article then definitely give your feedback.



Comments

Post a Comment