Java program how to print Happy New Year in 10 times(using while loop)
java buzzwords
static keyword in java
The AI Revolution-Malayalam article
step by step explanation
Before writing Java code Install Jdk on your system and Set the path properly. Then type the Java code in the notepad and save it as a class name with the .java extension. Select the file type 'all file' while saving. Open cmd, Change the directory where the file is saved, using the cd command. Type javac class name.java then press the enter key, If you type java and give the class name, If there is no error in the program, the output will be generated. Observe the directory change using the cd command. Give the class name and watch it compile and run.
How to run java program in notepad and cmd
Where to code in Java and how it works?
method 1
A text editor is required to write Java code
The code can be run using the command prompt
method 2
using an integrated development environment (IDE), such as Eclipse IDE.
what is while loop in java with example program?
'while' is a java keyword, using control structure.
'While' loop is executes a block of code as long as its condition remains true.
Java program how to print happy new year in 10 times(using while loop)
class ExambleWhile
{
public static void main(String args[])
{
int count=0;
while(count<10){
System.out.println("HAPPY NEW YEAR");
count++;
}
}
}
Java Hello World programe
class Hello1
{
public static void main(String arg[])
{
System.out.println();
System.out.println("Hello World");
}
}
Notepad CMD output
object-oriented programming-interface
Nice
ReplyDelete