What is java
Java is a programming language and a platform. Java is a high level, robust, object-oriented and secure programming language.
Figure 1-1. Java Logo (https://en.wikipedia.org/wiki/Java_(programming_language))
History
Java is currently one of the most influential programming languages. It all started in 1990, when an American company that was leading the revolution in the computer industry decided to gather its best engineers together to design and develop a product that would allow them to become an important player in the new emerging Internet world. Among those engineers was James Arthur Gosling, a Canadian computer scientist who is recognized as the “father” of the Java programming language.
When Java Was Owned by Sun Microsystems
The American company that started all of this was Sun Microsystems, founded in 1982. It guided the computer revolution by selling computers, computer parts, and software. Among their greatest achievements is the Java programming language. In Figure 1-2,2 you can see the company logo that was used since Java’s birth year until it was acquired by Oracle in 2010.
Figure 1-2. The Sun Microsystems logo (image source: https://en.wikipedia. org/wiki/Sun_Microsystems)
Nowadays, developers face a lot of headaches when developing software that should run on any operating system. And with the mobile revolution, things have become really tricky. In Figure 1-3, you see an abstract drawing of what is believed to be the first Java logo.
Figure 1-3. The first Java logo, 1996–2003
Java 1.0 was released at the first JavaOne conference—with over 6000 attendees. It started out as a language named Oak3 that was really similar to C++ and was designed for handheld devices and set-top boxes. It evolved into the first version of Java, which provided developers some advantages that C++ did not.
- security: In Java, there is no danger of reading bogus data when accidentally going over the size of an array.
- automatic memory management: A Java developer does not have to check if there is enough memory to allocate for an object and then deallocate it explicitly; the operations are automatically handled by the garbage collector. This also means that pointers are not necessary.
- simplicity: There are no pointers, unions, templates, structures. Mostly anything in Java can be declared as a class. Also, confusion when using multiple inheritance is avoided by modifying the inheritance model and not allowing multiple class inheritance.
- support for multithreaded execution: Java was designed from the start to support development of multithreaded software.
- portability: A Java motto is Write it once, run it everywhere. This is made possible by the Java virtual machine, which is covered shortly.
Sun Microsystem’s Java Versions
The first stable Java version released by Sun Microsystems could be downloaded from the website as an archive named JDK 1.0.2. JDK is an acronym for Java Development Kit. This is the software development environment used for developing Java applications and applets. It includes the Java Runtime Environment (JRE), an interpreter (loader), a compiler, an archiver, a documentation generator, and other tools needed for Java development. We will get into this more when I cover how to install the JDK on your computer.
Starting with version 1.2, released in 1998, Java versions were given codenames.5 The Java version 1.2 codename was Playground. It was a massive release and this was the moment when people started talking about the Java 2 Platform. Starting with this version, the releases up to J2SE 5.0 were renamed, and J2SE replaced JDK because the Java platform was now composed of three parts:
- J2SE (Java 2 Platform, Standard Edition), which later became JSE, a computing platform for the development and deployment of portable code for desktop and server environments
- J2EE (Java 2 Platform, Enterprise Edition), which later became JEE, a set of specifications extending Java SE with specifications for enterprise features such as distributed computing and web services
- J2ME (Java 2 Platform, Micro Edition), which later became JME, a computing platform for development and deployment of portable code for embedded and mobile devices
With this release, the JIT compiler became part of Sun Microsystem’s JVM (which basically means turning code into executable code became a faster operation and the generated executable code was optimized), the Swing graphical API was introduced as a fancy alternative to AWT (new components to create fancy desktop applications were introduced), and the Java collections framework (for working with sets of data) was introduced. J2SE 1.3 was released in 2000 with the codename Kestrel (maybe as a reference to the newly introduced Java sound classes). This release also contained Java XML APIs. J2SE 1.4 was released in 2002 with the codename Merlin. This is the first year that the Java
Community Process members were involved in deciding which features the release should contain, and thus, the release was quite consistent. This is the first release of the Java platform developed under the Java Community Process as JSR 59.6 .
Oracle Takes Over
Although Sun Microsystems won a lawsuit against Microsoft, in which they agreed to pay $20 million for not implementing the Java 1.1 standard completely, in 2008, the company was in such poor shape that negotiations for a merger with IBM and Hewlett-Packard began. In 2009, Oracle and Sun announced that they agreed on the price: Oracle would acquire Sun for $9.50 a share in cash; this amounted to a $5.6 billion offer. The impact was massive. A lot of engineers quit, including James Gosling, the father of Java, which made a lot of developers question the future of the Java platform.
Java SE 7, codename Dolphin, was the first Java version released by Oracle in 2011. It was the result of an extensive collaboration between Oracle engineers and members of the worldwide Java communities, like the OpenJDK Community and the Java Community Process (JCP). It contained a lot of changes, but still, a lot fewer than developers expected. Considering the long period between the releases, the expectations were pretty high. Project Lambda, which was supposed to allow usage of lambda expressions in Java (this leads to considerable syntax simplification in certain cases), and Jigsaw (making JVM and the Java application modular; there is a section in Chapter 3 about them) were dropped. Both were released in future versions. The following are the most notable features in Java 7.
- JVM support for dynamic languages with the new invokedynamic bytecode (basically, Java code can use code implemented in non-Java languages, such as C)
- Compressed 64-bit pointers (internal optimization of the JVM, so less memory is (consumed)Small language changes grouped under project Coin
- – strings in switch
- – automatic resource management in try-statement
- – improved type inference for generics—the diamond <> operator
- – binary integer literals
- – multiple exceptions handling improvements
- Concurrency improvement.
- New I/O library (new classes added to read/write data to/from files, covered in Chapter 8)
- Timsort to sort collections and arrays of objects instead of merge sort (Sets of data that are ordered need to be sorted using an algorithm, basically, in this version, the algorithm was replaced with one that has better performance. Better performance usually means reducing of consumed resources: memory and/or CPU, or reducing the time needed for execution.)
JavaFX 2.0 was released with Java 7. This confirmed that the JavaFX project had a future with Oracle. As a major change, JavaFX stopped being a scripting language and became a Java API. This meant that knowledge of the Java language syntax would be enough to start building user graphical interfaces with it. JavaFX started gaining ground over Swing because of its hardware-accelerated graphical engine called Prism that did a better job at rendering.
Java SE 8, codename Spider, was released in 2014, and included features that were initially intended to be part of Java 7. But, better late than never, right? Three years in the making, Java 8 contained the following key features.
- Language syntax changes
– Support for default methods in interfaces
– New date and time API
– New way to do parallel processing by using streams
- Improved integration with JavaScript (the Nashorn project). JavaScript is a web scripting language that is quite loved in the development community, so providing support for it in Java probably won Oracle a few new supporters.
- Improvements of the garbage collection process
What the Future Holds
Java has dominated the industry for more than 20 years. It wasn’t always at the top of the most-used development technologies, but it never left the top five since its existence. Even with server-side JavaScript smart frameworks, like Node.js, the heavy-lifting is still left to Java. Emerging programming languages like Scala and Kotlin run on the JVM, so maybe the Java programming language will suffer a serious metamorphosis in order to compete, but it will still be here.
The modularization possibility introduced in version 9 opens the gates for Java applications to be installed on smaller devices, because to run a Java application, we no longer need the whole runtime—only its core plus the modules the application was built with.
Also, there are a lot of applications written in Java, especially in the financial domain, so Java will still be here, because of legacy reasons and because migrating these titan applications to another technology is an impossible mission. Java will probably survive and be on top for the next 10 to 15 years. It does help that it is a very mature technology with a huge community built around it.
And the fact that is easy to learn and developer-friendly makes it remain the first choice for most companies. So, you might conclude at this point that learning Java and buying this book is a good investment
0 Comments
if you have any doubts.Please let me know