Hello : How to Create Your First Java Program
Hello : How to Create Your First Java Program |
It's a First Program Of Java⬇
class Suryansh
{
public static void main(String a[])
{
System.out.println("hello");
}
}
Compile the Program
class Suryansh
{
public static void main(String a[])
{
System.out.println("hello");
}
}
format of save the java program & Important points
format: classname.java
{ first letter of class name is always capital }
{class name and file name is always same }
ex: Suryansh.java,Technical.java
Compile the Program
we will use the javac command[CMD] to convert your Java program into a form more amenable for execution on a computer.
first open CMD
C:\Users\username>d: {drive name}
D:\>cd java {folder name when program is saved}
Assuming the file, say Suryansh.java, is in the current working directory, type the javac command give space and your program name.
D:\java>javac Suryansh.java
write our java & our program name with out ".java"
If everything went well, you should see no error messages.
Execute the Program |
You will use the java command to execute your program.
From the Command Prompt, type the java command below.
D:\java>java Suryansh
Hello
output of the program - Hello
--------------------------------------------------------------------------------------------------------------------------
========================================================================
The first step creates the program; the second translates it into a language ... A compiler is an application that translates programs from the Java language,Write your first Java program. This tutorial explains with example steps to compile and run hello world program.,
simple java program examples for beginners,java programs,hello world program in java using notepad,list of java programs,java programs examples with output,how to run java program,java hello world tutorial,java program to add two numbersThe first step creates the program; the second translates it into a language ... A compiler is an application that translates programs from the Java language,Write your first Java program. This tutorial explains with example steps to compile and run hello world program.,
simple java program examples for beginners,java programs,hello world program in java using notepad,list of java programs,java programs examples with output,how to run java program,java hello world tutorial,java program to add two numbers
simple java program examples for beginners,java programs,hello world program in java using notepad,list of java programs,java programs examples with output,how to run java program,java hello world tutorial,java program to add two numbersThe first step creates the program; the second translates it into a language ... A compiler is an application that translates programs from the Java language,Write your first Java program. This tutorial explains with example steps to compile and run hello world program.,
simple java program examples for beginners,java programs,hello world program in java using notepad,list of java programs,java programs examples with output,how to run java program,java hello world tutorial,java program to add two numbers
No comments:
Post a Comment