ALL ABOUT NETWORKS
•   Network
•   Interconnection of computers is called network. A network may contain two or
    more computers connected with or without a cable.
•    
•   The primary purpose of a network is resources sharing, which means a computer
    can share its resources, like data, memory, software, hardware, CPU, etc. with
    other computers on the network.
•   A Network with two computers
                 Client                                         Server
                             Client sends request for service
                             Server sends response to client
•   What is the advantage of a network?
•    The main advantage of a network is that it makes resource sharing possible among
    the connected system, thus helping better utilization of resources.
•   Hardware:       computer systems, Network Interface Cards (NIC), cables, modems,
    hubs, satellites etc…
•   Software:       Any software, which supports networking features, like Unix, Linux,
    Windows NT, etc. so that data can be sent or received.
•    
•   Protocol: Protocol could be defined as a Standard procedure for regulating data
    transmission between computers. It specifies a way to indentify the destination
    and source computers and establish a connection between them to receive or
    send data.
•    
•   For example: TCP/IP 0r UDP protocols help to divide data into small packets of
    several bytes, insert the packets into frames and then send those frames to the
    destination computer over the network protocol is the underlying feature of the
    software used on the network.
•   Which is the most widely used protocol on internet?
•   HTTP is the most widely used protocol on internet. The text on the internet is sent
    or received from one machine to another using this protocol only.
                               Execution of a C program
            X1.c              X1.obj                 X1.exe
C Program source code   C Program source code      Executable code   Program output
•      Execution of a Java Program
            X1.java             X1.class              JVM
Java Program source code        Byte code   JVM converts byte code into machine code   Program output
•   What is the difference between an executable file and a class file?
•   Exe file contains machine language instructions for the microprocessor and is
    system dependent
•   Class file contain byte code instructions for the JVM and is system independent.
•   Why Java is suitable for internet?
•   Java is suitable for internet because of two main reasons.
•   It is system independent and hence its programs can run any type of computer
    system available on internet.
•   Security.
                             INTRODUCTIONS TO JAVA
•   History of Java Language
•    
•   In 1990, Sun Micro systems Inc (US) Has conceived a project to develop software
    for consumer electronics devices that could be controlled by a remote . This
    project Stealth Project but later its name was changed to Green Project.
•    
•   In January of 1991, Bill Joy, James Gosling, Mike Sheradin, Patric Naughton, and
    several others met in Aspen, Colorado to discuss this project.
•   Mike sheradin was to focus on Business Development.
•   Patrick Naughton was to begin work on Graphics System
•   And James Gosling was to identify the proper programming language for the
    project.
•   Gosling thought C and C++ could be used to develop the project. But the problem
    he faced with them is those were system dependent languages and hence could
    not be used on various processors. Which the electronic devices might use. So he
    started developing a new language. This was completely system independent. This
    language was initially called Oak. Since this name was registered by some other
    company. Later it was changed to Java.
•   Why the name Java?
•   James gosling and his team members were consuming a lot of coffee while
    developing this language. They felt that they were able to develop a better
    language because of the good quality coffee they consumed. So the coffee had its
    own role in developing this language and good quality coffee was exported to the
    entire world from a place called “Java island”. Hence the fixed the name of the
    place for the language as Java. And the symbol for Java Language is coffee cup and
    saucer.
•   By September of 1994, Nughton and Jonathan Payne started writing WebRunner –
    a Java Based web browser, which was later renamed as HotJava. By October 1994,
    HotJava was stable and was demonstrated to Sun executives. HotJava was the first
    browser, having capabilities of executing applets, which are programs designed to
    run dynamically on internet. This time, Java’s potential in the context of the World
    Wide Web was recognized.
•   Sun formally announced Java and Hot Java at Sun World conference in 1995. Soon
    after, Netscape Inc. announced that it would incorporate Java Support in its
    browser Netscape Navigator. Later, Microsoft also announced that they would
    support Java in their Internet Explorer Web browser, further solidifying Java’s role
    in the World Wide Web. On January 23rd 1996, JDK 1.0 version was released. Today
    more than 7 million developers use Java and more than 2.75 billion devices run
    Java.
                          Java Versions, Features and History
•   A popular interview question in java is “what is new in Java version X?”. Is that an
    intelligent question is debatable. I have summarized below important new features
    added in each major java release till now. I target to highlight important features
    added in respective release. Apart from below list of features, every release has
    enhancements and lots of bug fixes.
                                New features in Java 1.8
•   Here are the new Java 1.8 features I'll talk about:
•   Lambda expressions
•   Remove the Permanent Generation
•   Small VM
•   Parallel Array Sorting
•   Bulk Data Operations for Collections
•   Define a standard API for Base64 encoding and decoding
•   New Date & Time API
•   Provide stronger Password-Based-Encryption (PBE) algorithm implementations in
    the SunJCE provider
                                  Features of Java 8
•   Here is a brief summary of the enhancements included with the Java 8 release:
    Lamda Expression and Virtual Extension Methods Highlighting feature of Java SE 8
    is the implementation of Lamda expressions and supporting features to the Java
    programming language and platform.
•   Date and Time API
•   This new API will allow developers to handle date and time in a more natural,
    cleaner and easier to understand way.
•   Nashhorn JavaScript Engine A new lightweight, high performance implementation
    of JavaScript engine is integrated to JDk and is available to Java applications via
    existing APIs.
•   Improved Security Replacing the existing hand-maintained list of caller sensitive
    methods with a mechanism that accurately identifies such methods and allows
    their callers to be discovered reliably.
•   Java Version SE 7
•   Code named Dolphin and released on July 28, 2011.
•   New features in Java SE 7
•   Strings in switch Statement
•   Type Inference for Generic Instance Creation
•   Multiple Exception Handling
•   Support for Dynamic Languages
•   Try with Resources
•   Java nio Package
•   Binary Literals, underscore in literals
•   Diamond Syntax
•   Automatic null Handling
•   Java Version SE 6
•   Code named Mustang and released on December 11, 2006.
•   New features in Java SE 6
•   Scripting Language Support
•   JDBC 4.0 API
•   Java Compiler API
•   Pluggable Annotations
•   Native PKI, Java GSS, Kerberos and LDAP support.
•   Integrated Web Services.
•   Lot more enhancements.
•   J2SE Version 5.0
•   Code named Tiger and released on September 30, 2004.
•   New features in J2SE 5.0
•   Generics
•   Enhanced for Loop
•   Autoboxing/Unboxing
•   Typesafe Enums
•   Varargs
•   Static Import
•   Metadata (Annotations)
•   Instrumentation
•   J2SE Version 1.4
•   Code named Merlin and released on February 6, 2002 (first release under JCP).
•   New features in J2SE 1.4
•   XML Processing
•   Java Print Service
•   Logging API
•   Java Web Start
•   JDBC 3.0 API
•   Assertions
•   Preferences API
•   Chained Exception
•   IPv6 Support
•   Regular Expressions
•   Image I/O API
•   J2SE Version 1.3
•   Code named Kestrel and released on May 8, 2000.
•   New features in J2SE 1.3
•   Java Sound
•   Jar Indexing
•   A huge list of enhancements in almost all the java area.
•   J2SE Version 1.2
•   Code named Playground and released on December 8, 1998.
•   New features in J2SE 1.2
•    
•   Collections framework.
•   Java String memory map for constants.
•   Just In Time (JIT) compiler.
•   Jar Signer for signing Java ARchive (JAR) files.
•   Policy Tool for granting access to system resources.
•   Java Foundation Classes (JFC) which consists of Swing 1.0, Drag and Drop, and Java
    2D class libraries.
•   Java Plug-in
•   Scrollable result sets, BLOB, CLOB, batch update, user-defined types in JDBC.
•   Audio support in Applets.
•   JDK Version 1.1
•   Released on February 19, 1997
•   New features in JDK 1.1
•   JDBC (Java Database Connectivity)
•   Inner Classes
•   Java Beans
•   RMI (Remote Method Invocation)
•   Reflection (introspection only)
•    
•   JDK Version 1.0
•   Codenamed Oak and released on January 23, 1996.
                                Characteristic of java
•   Simple , small and familiar
•   Object oriented
•   Distributed
•   Robustness
•   Secure
•   Architecture Natural or Platform Independent
•   Portable compiled & Interpreted
•   High Performance
•   Multithreaded & Interactive
•   Dynamic and extensible
                              Simple small and Familiar
•   Syntax is just like C++
•   It is very easy to learn
•   It does not use any header files
•   It eliminates operator overloading and virtual base classes
•   It is small language so we can writes s/w that can run small computer
                                   Object Oriented
•    
•   It’s purely object oriented language
•   Everything in java is an object
•   All programs data reside inside the objects and classes
•   Distributed
•    
•   It has strong network facilities. So we can create and application network
•   Use java we can open and use the application on internet. This facility helps the
    users from different place to work together on a single application
•   Robustness
•    
•   In many languages attention is not given an memory management and exception
    concept. But in java we are use the advanced techniques called garbage collections
    and exception handling
•    
•   Secure
•   Java is a programming language on internet so security becomes an important
    issue. Before a java code from internet is interpreted, and security check is applied
    on internet.
•    
•   Digitally signing
•    
•   Java has a facility to sign our java code before send it.
•   At the receiving and the receiver can tally the signature if the signature is matches,
    the codes reached correctly this concepts is called digitally signing.
•    
 •   Architecture Natural Language
                                              Source code
                                             Java compiler
                                               Byte code
                                              011011011
                                              100110010
Java compiler generates platform independent code from the source code. It cable to
run any type of system that is called byte code (class file)
•   Portable
•   In java size of primitive data types or machine independent so java is portable
    language
•   High Performance 
•   Since java interpreter uses by the codes so the performance is high
•    
•   Multi threaded and Interactive
•   Multi threaded means handling more than one jobs at a time
•   Java also supports by interactive programs
•   Dynamic and Extensible
•   It capable to create the passes and executes the method at the runtime so it’s
    dynamic. We can extern the feature of java language so it is extensible.
•   Parts of Java 
•   Sun Micro System Inc has divided Java into 3 parts Java SE, Java EE, Java ME. Let us
    discuss them in brief here:
•    
•   Java SE: It is the Java Standard Edition and it contains basic core java classes. This
    edition is used to develop standard applets and application.
•    
•   Java EE: It is the Java Enterprise Edition and it contains classes that are beyond
    Java SE. In fact, we need Java SE in order to use many of the classes in Java EE
    mainly concentrates on providing business on a network.
•    
•   Java ME: It stands for Java Micro Edition. Java ME is for developers who develop
    code for portable devices, such as a PDA or a cellular phone. Code on these
    devices needs to be small in size and should take less memory.
                    Differentiate JVM JRE JDK JIT : Getting Started
•   Java Virtual Machine (JVM) is an abstract computing machine. Java Runtime
    Environment (JRE) is an implementation of the JVM. Java Development Kit (JDK)
    contains JRE along with various development tools like Java libraries, Java source
    compilers, Java debuggers, bundling and deployment tools.
                             JDK (Java Development Kit):
•   Java Developer Kit contains tools needed to develop the Java programs, and JRE to
    run the programs. The tools include compiler (javac.exe), Java application launcher
    (java.exe), Appletviewer, etc…
    Compiler converts java code into byte code. Java application launcher opens a JRE,
    loads the class, and invokes its main method.
    JDK (Java Development Kit) is a software development kit to develop applications
    in Java. When you download JDK, JRE is also downloaded, and don't need to
    download it separately. In addition to JRE, JDK also contains number of
    development tools (compilers, JavaDoc, Java Debugger etc).
                           JRE (Java Runtime Environment):
•   JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime
    libraries.
•   Java Runtime Environment contains JVM, class libraries, and other supporting files.
    It does not contain any development tools such as compiler, debugger, etc.
    Actually JVM runs the program, and it uses the class libraries, and other supporting
    files provided in JRE. If you want to run any java program, you need to have JRE
    installed in the system.
•   JRE (Java Realtime Environment) is a software package that provides Java class
    libraries, along with Java Virtual Machine (JVM), and other components to run
    applications written in Java programming. JRE is the superset of JVM.
                               JVM (Java Virtual Machine):
•   When we compile a Java file, output is not an .exe but it’s a .class file. This .class is
    known as Java byte code, It has the Java byte codes which can be understood by
    JVM.
•   Java Virtual Machine interprets the byte code into the machine code and execute
    it. It is responsible for all the things like garbage collection, array bounds checking,
    etc… JVM is a cornerstone of the write-once run-anywhere value of Java
    programs.
•   Note: JVM is platform dependent but it makes the Java platform independent.
•   The Java Virtual Machine provides a platform-independent way of executing code;
    programmers can concentrate on writing software, without having to be
    concerned with how or where it will run.
                              JIT (Just-in-time Compiler):
•   JIT also known as dynamic translation. JIT is the part of the Java Virtual Machine
    (JVM) that helps to speed up the execution time. Parts of the byte code that have
    similar functionality at the same time complied by JIT and saves time needed for
    compilation. It translates the instruction set of a Java virtual machine (JVM) to the
    instruction set of a specific CPU.