FIRST PROGRAM IN JAVA:
To make your first program in java, you have to do the following actions given below.
import java.io.*;
import java.util.Scanner;
class Welcome
{
public static void main(String [] args)
{
Scanner input = new Scanner(System.in);
System.out.println("Welcome to the Bluej");
}
}
To make your first program in java, you have to do the following actions given below.
import java.io.*;
import java.util.Scanner;
class Welcome
{
public static void main(String [] args)
{
Scanner input = new Scanner(System.in);
System.out.println("Welcome to the Bluej");
}
}
- First copy the above mentioned code in your notepad.
- Save it on the desktop with the name "Welcome.java".
- Than open your start menu.
- Than write "CMD" in your search bar.
- When "CMD" opens,
- Than write "cd desktop"
- After that write "javac Welcome.java".
- After that write "java Welcome".
- After that the output i.e. "Welcome to Bluej" will be shown on the screen in your Command Prompt..
0 comments:
Post a Comment