Showing posts with label Typing. Show all posts
Showing posts with label Typing. Show all posts

Monday, 19 September 2016

Typing

First Java program

Basic steps to see the output in Java career 
  • Write a program (Ex: Sample.java)
  • Compile Sample.java
  • Run Sample.class
  • Output
---------------------------------------------------------------------------------------------------
Program 1        :       Write a Basic Java program
Output            :       Hello Nireekshan
Program name  :       Sample.java

class Sample
{
        public static void main(String args[])
        {
                System.out.println(“Hello Nireekshan”);
        }
}

Compile     :       javac Sample.java
Run           :       java Sample
Output       :       Hello Nireekshan
---------------------------------------------------------------------------------------------------
Save Program:
  • We need to save program with .java extension.
  • Above program we saved with the name of Sample.java

    Thanks for your time.
    Nireekshan
    Read More