ØSet up/Install Java
1. Make sure the JDK is installed and that the jdk/bin directory is on the executable path.
2. Updating the PATH Environment Variable
3.Verify Java Installed Correctly
Windows + R = Open Run
Simple Program of Java
In this page, we will learn how to write the simple program of java. We can write a simple hello java program easily after installing the JDK.
To create a simple java program, you need to create a class that contains main method.
Let's understand the requirement first
Requirement for Hello Java Example
For executing any java program, you need to
● Set path of the jdk/bin directory.
● create the java program
● compile and run the java program
Creating hello java example
To compile: javac HelloWorld.java
To execute: java HelloWorld
Output: HELLO WORLD
|
No comments:
Post a Comment