Home > Java > javaTutorial > Day Dec -->java simple program

Day Dec -->java simple program

Patricia Arquette
Release: 2025-01-03 16:07:43
Original
882 people have browsed it

Step by Step procedure:
step 1: First type the code in text editor
step 2: After typing the code press ctrl s
step 3: Pop up will click the documents and create new folder with name B14
step 4: Next file is name is most important. The class name as file name and file name should be saved in .java
step 5: Next open in terminal and type [ls] to view the list of documents
step 6: Now go to the files,Open documents folder[B14] and right click the curser and open in terminal
step 7: The terminal will be opened type the command javac First.java ,It will ask to install jdk in that choose the option yes.
-> After that list of jdk will appear in that select and copy sudo apt install default - jdk.
-> Please wait for few minutes until it gets completed
step 8: Then type the command java filename
step 9: Now click the enter the output will be diplay.

program:
Source code:
public class First
{
public static void main(String[] args)
{
System.out.println("Welcome To Java");

}
}
output:
Welcome To Java
Day  Dec -->java simple program

Task
public class second
{
public static void main(String[] args)
{
System.out.println("Hello World");
}
}
Output:
Hello World

Day  Dec -->java simple program

The above is the detailed content of Day Dec -->java simple program. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template