Thursday, November 22, 2018

Java Tutorials: Java Programming Language


A brief description of the Java.


Java is a programming language , just like our natural languages like Telugu, English Hindi, Spanish etc. Here these languages are used to communicate with the people. where as a Java programming language is also a language which is used to communicate with the Machines.

In order to understand by the machines , they need some instructions , nothing but Java instructions (often called as byte code) this byte code or java instructions are understandable by the machines , os that they will execute of our program

Question: How this Java will communicate with the machines?


Lets take an example:


class Welcome
{
  
    public static void main(String args[])
    {
        System.out.println("Welcome to java");
    }
}

In the command prompt , we have to compile the above java program with the below command

javac Welcome.java by the above command , welcome.class file  will be generated and it contaions java instruction ,these instructions are understandable by a program called JVM , and it is responsible to execute the java program.

After compile, we need to run the above program to get the output with the below command

java welcome

it will display the output like below

Welcome to java

No comments:

Post a Comment