java introduction

1. JAVA NOTES...



Image result for Java Programming Logo


Introduction for java .


Java is an object-oriented programming language with its runtime environment. It is a combination of features of C and C++ with some essential additional concepts. Java is well suited for both standalone and web application development and is designed to provide solutions to most of the problems faced by users of the internet era.




JAVA was developed by Sun Micro systems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naught . It is a simple programming language.  Writing, compiling and debugging a program is easy in java.  It helps to create modular programs and reusable code.


What is Java?


  • Java is an object-oriented programming language developed by Sun Micro systems, and it was released in 1995.
  • James Gosling initially developed Java in Sun Micro systems (which was later merged with Oracle Corporation).
  • Java is a set of features of C and C++. It has obtained its format from C, and OOP features from C++.
  • Java programs are platform independent which means they can be run on any operating system with any processor as long as the Java interpreter is available on that system.
  • Java code that runs on one platform does not need to be recompiled to run on another platform; it's called write once, run anywhere(WORA).
  • Java Virtual Machine (JVM) executes Java code, but it has been written in platform-specific languages such as C/C++/ASM, etc. JVM is not written in Java and hence cannot be platform independent, and Java interpreter is a part of JVM.



Java Virtual Machine (JVM)

This is generally referred as JVM. Before, we discuss about JVM lets see the phases of program execution. Phases are as follows: we write the program, then we compile the program and at last we run the program.

1) Writing of the program is of course done by java programmer like you and me.
2) Compilation of program is done by java c compiler, java c is the primary java compiler included in java development kit (JDK). It takes java program as input and generates java byte code as output.
3) In third phase, JVM executes the byte-code generated by compiler. This is called program run phase.



Byte-code


As discussed above, java c compiler of JDK compiles the java source code into byte-code so that it can be executed by JVM. The byte-code is saved in a .class file by compiler.

Java Development Kit(JDK)


While explaining JVM and byte code, I have used the term JDK. Let’s discuss about it. As the name suggests this is complete java development kit that includes JRE (Java Run time Environment), compilers and various tools like Java Doc, Java debugger etc.

In order to create, compile and run Java program you would need JDK installed on your computer.



Java Run time Environment(JRE)


JRE is a part of JDK which means that JDK includes JRE. When you have JRE installed on your system, you can run a java program however you won’t be able to compile it. JRE includes JVM, browser plugins and applets support. When you only need to run a java program on your computer, you would only need JRE.


Where is Java being Used?


Earlier Java was only used to design and program small computing devices, but it was later adopted as one of the platform-independent programming languages, and now according to Sun,
3 billion devices run Java.


Java is one of the most important programming languages in today's IT industries.
  • JSP - In Java, JSP (Java Server Pages) is used to create dynamic web pages, such as in PHP and ASP.
  • Applets - Applets are another type of Java programs that are implemented on Internet browsers and are always run as part of a web document.
  • JEEP - Java 2 Enterprise Edition is a platform-independent environment that is a set of different protocols and APIs and is used by various organizations to transfer data between each other.
  • Java Beans - This is a set of reusable software components that can be easily used to create new and advanced applications.
  • Mobile - In addition to the above technology, Java is widely used in mobile devices nowadays, many types of games and applications are being made in Java.
Types of Java Applications
  1. Web Application - Java is used to create server-side web applications. Currently, Servlet, JSP, Struts, JSF, etc. technologies are used.
  2. Standalone Application - It is also known as the desktop application or window-based application. An application that we need to install on every machine or server such as media player, antivirus, etc. AWT and Swing are used in java for creating standalone applications.
  3. Enterprise Application - An application that is distributed in nature, such as banking applications, etc. It has the advantage of the high-level security, load balancing, and clustering. In Java, EJB is used for creating enterprise applications.
  4. Mobile Application - Java is used to create application software for mobile devices. Currently, Java ME is used for building applications for small devices, and also Java is a programming language for Google Android application development.


Image result for Java Wallpaper



Features of Java
  • Object-Oriented - Java supports the features of object-oriented programming. Its object model is simple and easy to expand.
  • Platform independent - C and C++ are platform dependency languages hence the application programs written in one Operating system cannot run in any other Operating system, but in platform independence language like Java application programs written in one Operating system can able to run on any Operating system.
  • Simple - Java has included many features of C / C ++, which makes it easy to understand.
  • Secure - Java provides a wide range of protection from viruses and malicious programs.  It ensures that there will be no damage and no security will be broken.
  • Portable - Java provides us the concept of portability. Running the same program with Java on different platforms is possible.
  • Robust - During the development of the program, it helps us to find possible mistakes as soon as possible.
  • Multi-threaded - The multi threading programming feature in Java allows you to write a program that performs several different tasks simultaneously.
  • Distributed - Java is designed for distributed Internet environments as it manages the TCP/IP protocol



 




Comments

Popular Posts