navbar

Wednesday, 9 September 2020

INTRODUCTION TO JAVA

 

INTRODUCTION TO JAVA

Java is an Object oriented programming language develop in 1991 by James Gosling at that time it was called as Oak, but later in 1995 it was renamed as Java by Sun Microsystems.

Features of Java

  • Java is a simple language.
  • Java is a object oriented language (OOP).
  • Java is a robust and secure language.
  • Java is a sensitive language means upper and lower case treated differently.
  • Java is a platform independently language means write once and run anywhere.

 

Sample Java program…

Write a program to add two positive integer number.

class Num                             // created class name of Num                 

{

public static void main(String args[])     //then created main function

{

Int a = 5;                  // inserted integer in variable a

Int b = 8;                  // inserted integer in variable b

Int c = a + b;            // then add both integer in variable c

System.out.println(“The Sum of two Number is =”+c);    //printing 

}                                                                                           the sum

}

 ...................................end..............................................

 

 

 

No comments:

Post a Comment