What is JAVA?

  JAVA is a high level  programming language. It was developed in the year 1995 by Sun Microsystems.JAVA programming language is fast ,reliable and secure .We can use JAVA to develop applications in Android mobiles , desktops, game consoles, super computers, etc...

 JAVA is a object oriented programming language where all the code will be in the format of classes and objects .

Working Of JAVA:-


1.The source code with the help of compiler gets converted into byte code during the compilation time .

2.The byte code is being converted into machine code with the help of JAVA VIRTUAL MACHINE(JVM) during the run time.

      JVM :-It’s nothing but a JAVA platform to execute the java programs .

3.Then the machine code which was obtained is being directly executed by the machine .


Packages in JAVA:-


JAVA Packages

Description

Import java.util.*;

It contains time,scanner and regular expression classes.

Import java.awt.*;

It contains most common GUI events and GUI event listeners.

Import java.swing.*;

It contains more GUI elements.

Import java.io.*;

It will have input and output classes.

Import java.text.*;

It will have some formatting classes.



Let's see a simple JAVA program :-

import java.io.*;
class helloWorld{
    public static void main(String [] args)
    {
        System.out.print("Welcome to Code House of JAVA:) ");
    }
}

Algorithm:-

1.Start 
2.import the java packages for input and output classes .
3.Since,its an object oriented programming language we have to declare a class .The class will have a main method .
 Explanation:-
  • The acces modifier is public .
  • The main() method is static so that JVM can invoke it without instantiating the  class.  
  • It is a keyword and used to specify that a method doesn’t return anything.
  • The name of the String array is args 
4.Inside this we can print out hello world by using System.out.print
   Explanation:-
                            Here we need to print Welcome to Code House of JAVA  and it's a string so we have to use the double quotes " " and inside it we can type the text .

5.Stop

Screenshot:-

               1.Program Screenshot:-




               2.Output Screenshot:-