Java Example1
public class Example1 { public static void main(String[] args) { System.out.println("Hello World"); } }
Output
Hello World
How to run the Programming
First Step have to Compile the Program use Javac command
Javac Example1.java
Javac Command and Class name
After complie the program run the program
Lets write the Example2
public class Example2 { public static void main(String[] args) { System.out.println("-----Java---------"); } }
Output
—–Java———
Lets write the Example3
public class Example3
{
public static void main(String[] args)
{
System.out.println("******Java******");
}
}
Output
******Java******
Lets write the Example4
public class Example14
{
public static void main(String[] args)
{
System.out.println("*");
System.out.println("**");
System.out.println("***");
System.out.println("*****");
System.out.println("******");
}
}
Output
*
**
***
*****
******
Lets write the Example5
public class Example1
{
public static void main(String[] args)
{
System.out.println("John");
System.out.println("Peter");
System.out.println("Steve");
System.out.println("James");
System.out.println("jim");
}
}
Output
John
Peter
Steve
James
jim
Lets write the Example6
public class Example6
{
public static void main(String[] args)
{
System.out.println("---------------------");
System.out.println(" Peter ");
System.out.println(" Steve ");
System.out.println(" James ");
System.out.println(" Jim ");
}
}
Output
———————
Peter
Steve
James
Jim
Initialize the employee number, Hourswork,and Hoursrate to calculate a grosswage use the following condition. if…
Act as a Java developer to create a program that calculates the gross wage for…
Initialize the employee number, Hourswork,and Hoursrate to calculate a grosswage use the following condition. if…
In this tutorial, we will teach you how to create a simple school management system…
I have design the Admin Basic templete using React MUI Design Admin Dashboard and Login.Here…
In this tutorial ,i am to going teach the Laravel Breeze.Laravel Breeze provides a simple…