Saturday, 28 September 2013

How to Make Your First Program on Java

 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");
      
       }
   
}
  • 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..
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 comments:

Post a Comment