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
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.


Excellent 👌
ReplyDeleteSuper
ReplyDeleteGood Programmer
ReplyDelete