About Java:-


Java is a complete technology or platform, which is used to create small scale to large scale application’s using Java Programming language, Java Development Kit and Java Frameworks.
Java Technology Provide a complete platform to compile and execute the java program code using JDK and JRE.

Java code converted into byte code by java compiler under JDK.

Java Technology uses JVM (Java virtual machine ) to execute java byte code to any operating system hence Java is platform-independent but JVM dependent. JVM  is part of JRE.
JVM is a subpart of JRE which is also called the virtual operating system of Java.
In the developer machine, JDK and JRE both are required, but in the client machine, only JRE is required.
About Java Programming language:-
Java programming language is an Object-oriented programming language which is used to create a real-world based application for end-users.
Real-world application means the application which will be created for the normal user's for example Skype, Zoom, google meet is the best platform for video and audio conferencing.
Online banking, Whatsapp, Instagram, Facebook, google these all are real-world based application.

History of Java:-
Java programming language was developed by James Gosling and his teams from 1991 to 1995 under the Sun microsystem company. initially, java was named  OAK but oak was reserved hence it renamed  Java. java language is an enhancement of C and C++ language.  

Unique features of Java programming Languages:-

Java Programming language provides better 
1) Security
2) Reusability
3) Accessibility
4) Dynamic memory allocation (RAM) for real-time applications.
5)  Multithreading
6)  Distributed
7) Garbage collector for automatic memory management
8)  Remote programming using RMI
9)  Network Support
10)  Best processing speed under server and operating system.
Java is Platform dependent or Independent?
Java programming language is an operating system independent language because java program will be executed by JVM, not by the operating system.
When we compile Java Program code then it will convert into byte code by Java compiler, Byte code will be executed by JVM (Java Virtual Machine), not by the operating system hence JAVA Byte Code is Operating System free.
1) Hello.java---------------->
     (Compile)---->
2) Byte Code----->
      (Load by JVM ClassLoader) ------> 
3)  JVM---->(convert)--------> byte code to machine code using JIT.
 Machine code using JIT (Just in time compiler)
4)  machine code will be executed by the Operating System.
Java Terminology:-
JDK (Java Development Kit)--->
It provides Java compiler and library to convert Java Code to Byte Code
JRE (Java Runtime Environment):-
It provides a runtime environment to execute java program code.
JVM (Java Virtual Machine):-
It is used to execute Java byte code and converted into machine code using JIT
JNI  (Java Native Interface):-
It contain library for native code (c/c++) code execution. 
JIT (Just In Time Compiler):- 
It is used to convert byte code to machine code under JVM at runtime.
Software Tools For Java:-
........................................................................

How to download Java from the internet:-
https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
1 JDK + JRE 
 JDK (Java Development Kit)
it is used to compile java program code to byte code.
.java ----> .class conversion will be managed by JDK.
JRE  (JAVA Runtime Environment)
it is used to execute byte code(class file) to machine code using JVM(Java Virtual Machine).
JVM is the virtual executor for java program code but JVM is operating System dependent. Linux JVM and Windows JVM both will be different.
but .class file is common for all JVM.
note:-  for a developer or learner machine:-  JDK+JRE
for client machine:-   JRE (Java runtime environment)
................................................................................................................................................

How do we check Java is installed in the machine?
go on program files and check Java (JDK+JRE)
How do we check whether the Java path is set or not?
open command prompt and type javac.
if javac describes then the path is set.
internal or external command problem then the path is not set.
How to set the path?
1 temp path:-

 without admin permission, we can set this path .simple copy default path of java
c:/program files/java/jdk/bin
open command prompt type cmd on the run
set path=C:\Program Files\Java\jdk1.8.0_161\bin.
When the command prompt will be closed then the path will reset.
2 permanent paths:-
right click on mycomputer----> properties---> advance system setting--->environment variable----> new 
a window will appear.
variable name:-    path
variable value:-     C:\Program Files\Java\jdk1.8.0_161\bin
press ok, ok and ok
restart command prompt
Video to set path


CREATE the FIRST PROGRAM OF JAVA:-

Open notepad and write code

class Classname
{
   public static void main(String args[])
   {
          System.out.println("statement");
   }
}
2 Save this program using .java file
    Classname.java 

Compile this program

    javac Classname.java

4 Execute this program

    java Classname    
Assignment:- 

WAP to calculate simple interest?
Solution:-

class SI
{   
   public static void main(String args[])
  {
      float p,r,t,si;
      p=10000;
      r=2;
      t=2;
      si=(p*r*t)/100;
      System.out.println("result is ="+si);
   }
}
Write a program to calculate simple interest?
class SI
{
       public static void main(String args[])
    {
        float p=12000.2F,r=2.3F,t=2.5F,si;
        si=(p*r*t)/100;
        System.out.println("P= "+p);
        System.out.println("R= "+r);
        System.out.println("T= "+t);
        System.out.println("Result is "+si);
             }
}
WAP to reverse a five-digit number without using a loop?
The solution of this program;-
class Reverseexample
{
    public static void main(String args[])
    {
           int num = 12345;
           int a = num%10;
           num = num/10;
           int b = num%10;
           num = num/10;
           int c = num%10;
           num = num/10;
           int d = num%10;
           int e = num/10;
           int rev = a*10000+b*1000+c*100+d*10+e*1;
           System.out.print(rev); 
           }
}
WAP to Swap two numbers?
class Swap
{
     public static void main(String args[])
     {
         int a=100,b=20,c;
         System.out.println("a=" + a+ " b= " +b);
         c=a;
         a=b;
         b=c;
         System.out.println("a=" + a+ " b= " +b);
         
     }
}
Create a Program to print the name, email, mobile, and date of the birth field?
class Biodata
{
  public static void main(String args[])
  {
     String name,email,mobile,dob;
     name= "manish kumar";
     email= "manishkumar@gmail.com";
     mobile= "9812312345";
     dob="10/06/1998";
     System.out.println("name is "+name);
     System.out.println("email is "+email);
     System.out.println("mobile no is "+mobile);
     System.out.println("dob is "+dob);
        }
}
WAP to reverse 7 digit number?
WAP to convert temprature from celsious to  

Fahrenheit 

?
WAP to calculate electricity bill where unit price and total consumption will be assigned by the users?
Complex Number Addition?
class Complex
{
   public static void main(String args[])
   {
      int r1=5,r2=3,i1=2,i2=3,r,i;
      r = r1 + r2;
      i = i1 + i2;
      System.out.println(r1 + "+" + i1 + "i");
      System.out.println(r2 + "+" + i2 + "i");
      System.out.println(r + "+" + i + "i"); 
   }
}                   
                                                                                                     
                                                       NEXT SESSION