Java tutorial|Simple java program|Java program|How to compile a simple java program for beginners

Published: 02 May 2021
on channel: Clever Edge
17
4

#java#javabasic#compile#learnjava


In this video, I'm going to explain how to write the simple java program by using Notepad and command prompt . We can write a simple java program easily after installing the JDK.


By using below link we can install java jdk 16.0.1 latest version

   • How to install java 16.0.1 on windows 10 |...  

In simple java program the parameters used are,

class, public, static, void, main, String[], System.out.println().

class - It is a keyword used to declare a class in java.

public - It is also a keyword. It is an access modifier which means it is visible to all.

static - It is a keyword. If we declare any method as static, it is known as the static method. And in static method there is no need to create an object to invoke the static method.

void - It is the return type of the method. It means it doesn't return any value.

main - It represents the starting point of the program.

String arts[]  - It is used for command line argument. We will learn it later.

System.out.println()- It is used to print statement.



There are two main commands


To compile:javac claver.java

To execute:java claver


Subscribe to our channel for more videos

   • Learn  java| why java|Benefits of java and...  

   • class and object|Class and objects in java...  

   • Data types in java|Types of data types |Fu...  


Thank you


On this page of the site you can watch the video online Java tutorial|Simple java program|Java program|How to compile a simple java program for beginners with a duration of hours minute second in good quality, which was uploaded by the user Clever Edge 02 May 2021, share the link with friends and acquaintances, this video has already been watched 17 times on youtube and it was liked by 4 viewers. Enjoy your viewing!