JAVA
Java is a high level language and object-oriented programming language. It has also a platform.
■ Java has its own runtime environment it is called platform.
Platform:- Any hardware or
software environment in which a program runs is known as a platform.
|
■ Java provides s/w based platform.
We can develop two types of java programs.
- Stand-alone applications
- With applets
■ Stand-alone applications are programs written in Java to carry out certain tasks on a stand-alone local computer. In fact, Java can be used to develop programs for all kind of applications, which earlier, were developed using languages like C and C++. Executing a stand-alone Java program involves two steps:-
1 Compiling source code into bytecode using javac compiler
2 Executing the bytecode program using java interpreter.
■ Applets are small Java programs developed for Internet applications. An applet located on a computer (Server) can be downloaded via Internet and executed on a local computer (Client) using a java - capable browser. We can develop applets for doing everything from simple animated graphics to complex games and utilities . Since applets ambedded in an HTML (Hypertext Markup Language) document and run inside a Web page, creating and running applets are more complex than creating an application.
Two Ways
Java History
■Java was developed by James Gosling, Patrick Naughton, Chris Warth , Ed Frank and Mike Sheridan in 1991 at Sun Microsystems. It was initially called 'oak but was renamed as Java in 1995.
■Oak is a symbol of strength and choosen as a national tree of many countries like U.S.A., France, Germany, Romania etc.
■ In 1995, Oak was renamed as "Java because it was already a trademark by Oak Technologies.
■ Java is an island of Indonesia where first coffee was produced (called coffee).
*Note that java is just a name not an acronym.
■The original motivation for Java was the need for a platform-independent, architecture-neutral language that could be used to create software for various consumer electronic devices, such as TVs, VCRs, microwave ovens and remote controls.
■The problem with other programming languages such as C, C++ was that they were designed to achieve some specific targets and their compilers were expensive and time-consuming to create.
■ The popularity of Java was due to the evolution of web. If World Wide Web would not have developed at that time, it would have difficult for Java to gain such popularity.
Over the years, Java continued to grow, evolve, and otherwise redefine itself.
■The names Java Development Kit (JDK) and Software Development Kit (SDK) stand for different versions of the same toolset.
● Toolset- A toolset whose key component is a Java compiler.
There are many java versions that has been released.Current stable release of java is java SE 8. (.e. Java standard Edition 8):
1. Java JDK Alpha and Beta (1995)
2. Java JDK 1.0 (1996)
3. Java JDK 1.1 (1997)
4. J2SE 1.2 (1998) (i.e. Java 2 with version 1.2 of SDK)
5. J2SE 1.3 (2000) (i.e. Java 2 with SDK 1.3)
6 J2SE 1.4 (2002) (i.e. Java 2 with SDK 1.4)
7. J2SE 5.0 (2004) (i.e. Java 2 with JDK 5.0)
8. Java SE 6 (2006) (i.e. Java 6 with JDK)
In 2010, Oracle corporation purchases Sun Microsystems. Oracle releases some new versions of Java:
1. Java SE 7 (2011)
2. Java SE 8 (2014)
Java Features
(i) Simple
Java is easy to write and understand. Java programmer does not have to work with pointer and does not need to manage memory explicitely . Its virtual machine handles the memory management. Java also eliminates operator overloading and multiple inheritance.
Java language is also simple because syntax of its statements is based on C++ .
(ii) Java is Object Oriented
Java is fully object oriented language which follow all the rules of OOPS like inheritance, abstraction, polymorphism etc. and every thing can be treated in the form of objects.
(iii) Java is distributed
Java supports network programming to communicate with remote objects distributed over the network Java provides library like FMI and COBRA to develop network applications, just like client-server.
(iv) Compiled and Interpreted
A computer language is either compiled or interpreted but Java combines both these approaches thus making Java a two stage system. First, Java compiler translates source code into bytecode that is binary and platform independent. And in second stage, java interpreter generates machine code that can be directly executed by the machine that is running that java program .
(v) Platform Independent
Platform independence means that a program can run on any computer system. Java programs can run on any system for which a Java virtual machine (UVM) has been installed. JVM provides runtime environment in which java bytecode can be executed.
Java code can be run on multiple platform e.g. Windows, Linux, Sun Solaris, Mac OS etc. Java code is compiled by the compiler and converted into bytecode. This bytecode is a platform independent code because it can be run on multiple platforms i.e. Write Once and Run Anywhere (WORA).
(vi) High Performance
Java technology achieves high performance by adopting a scheme by which the interpreter can run at full speed without needing to check the run-time environment. Automatic Garbage Collection runs as a low-priority background thread, ensuring the high availability of memory, thus leading to better performance.
(vii) Case Sensitive
Java is a case sensitive programming language. Program' and 'program provide different meanings in Java.
(viii) Dynamic
While executing the java program, the user can get the required files dynamically from a local drive or from a remote computer thousands of miles away from the user just by connecting with the internet.
(ix) Robust
The ability to create robust programs was given a high priority in the design of Java. Java provides reliability and to achieve this, it restricts the programmers in some key areas to force them to find mistakes in program development. There is automatic garbage collection in java. There is exception handling and type checking mechanism in java. All these points makes java robust.
(x) Secure
Java provides extensive compile-time checking followed by run-time checking. Memory management process is quite secure. The objects are created with a new operator. There is no a pointer data type in java. Java technology is designed to operate in distributed environments, so, the security is a prime concern. Java is secured because
- No explicit pointer
- Programs run inside java virtual machine (JVM) sandbox
(xi) Multithreading
A thread is like a separate program, executing concurrently. Multithreading means a single program having different threads executed independently the same time.
Java supports multithreading and provides library for the Thread class was designed to meet the real-world requirement of creating interactive network programs. It allows the programmers to write programs that perform many tasks concurrently.
(xi) Java is Faster
Speed of java programs is faster comparable to other compiler-based languages such as C and C++.
(xii) Portable
Java code is portable. Java programs can be easily moved from one computer to the other computer system. A data bytecode can be executed on any machine that has the Java interpreter.
Wow👏👌👌👌wonder material
ReplyDeleteUseful data 👌👌👍👍
ReplyDeleteThis is fabulous❤❤
ReplyDeletePlease upload more information about this topics.
ReplyDeleteVery interesting 👌 👍
ReplyDeleteUnderstandable data for us
ReplyDeleteUnderstandable data for us
ReplyDeleteVery interesting topics ❤❤✍✍
ReplyDeleteAmazing work 👏
ReplyDeleteVery good 👍 keep it up 👌👌
ReplyDeleteGood efforts👍👍
ReplyDeleteThis is very beneficial for us.
ReplyDeleteUseful material 👌👌
ReplyDeleteGood work keep it up👍
ReplyDeleteVery good work👍👍
ReplyDeleteNice work👍👍❤️❤️
ReplyDeleteVery useful data 👍👍plz share more information about these topics
ReplyDeleteGreat learning app 👍👍👍
ReplyDeleteVery nice effort
ReplyDeleteGood work👍
ReplyDeleteunderstandable content good job 👍👍
ReplyDeleteNice efforts 😊😊
ReplyDeletegood work
ReplyDeleteNice efforts di 👍👍
ReplyDeleteVery nice 👍👍
ReplyDeleteGood content 👍👍
ReplyDeleteGreat idea with coding content
ReplyDelete👍👍
ReplyDelete👌👌👍
ReplyDeleteNice work 👍👍
ReplyDeleteOutstanding job share more topics in java👍👍
ReplyDeleteNice work👍👍
ReplyDeleteNice work👍👍
ReplyDelete👍Good work
ReplyDeleteVery nice content for BCA students
ReplyDeleteGood work
ReplyDeleteUseful content
ReplyDeleteVery nice content 👌
ReplyDeleteoutstanding content ## java
ReplyDeleteGood
ReplyDeleteUnderstandable content👍👍
ReplyDeleteNice efforts . More information upload about these topics.
ReplyDeleteGood job👍👍
ReplyDelete