Java Programming
In 1991, the team "Green Team" led by James Gosling at Sun Microsystems created a programming language for digital consumer devices. The language was called Oak then. Why Oak? Because there was an oak tree outside Gosling's office.
The "Green Team" demonstrated the use of the language with an interactive television. However, it was too advanced for the digital cable television at the time, and more suitable a technology that was starting to take off, the Internet.
Later, the language was renamed Green and finally renamed Java from Java coffee; hence the coffee-cup logo.
Since C/C++ was popular back then, James Gosling designed the language with C/C++ style syntax, and philosophy "write once, run anywhere". After years, Sun Microsystems released the first public implementation of Java in 1995. It was announced that the Netscape Navigator Internet browser would incorporate Java technology.
In 2010, Sun Microsystems was completely acquired by Oracle Corporation along with Java.
Java Version History
- June 1991 - Java language project was initiated
- JDK 1.0 - January, 1996
- JDK 1.1 - February, 1997
- J2SE 1.2 - December, 1998
- J2SE 1.3 - May, 2000
- J2SE 1.4 - February, 2002
- J2SE 5.0 - September, 2004
- Java SE 6 - December, 2006
- Java SE 7 - July, 2011
- Java SE 8 (latest version) - March 18, 2014
- Java SE 9 - July, 2017 (announced release date)
Features of Java Programming Language
- Java is platform independent
Java was built with the philosophy of "write once, run anywhere" (WORA). The Java code (pure Java code and libraries) you write on one platform (operating system) will run on other platforms with no modification.
To run Java, an abstract machine called Java Virtual Machine (JVM) is used. The JVM executes the Java bytecode. Then, the CPU executes the JVM. Since all JVMs works exactly the same, the same code works on other operating systems as well, making Java platform-independent. - An object-oriented Language
There are different styles of programming. Object-oriented approach is one of the popular programming styles. In object-oriented programming, a complex problem is divided into smaller sets by creating objects. This makes your code reusable, has design benefits, and makes code easier to maintain.
Many programming languages including Java, Python, and C++ has object-oriented features. If you are serious about programming, you should definitely learn object-oriented style of programming. - Java is fast
The earlier versions of Java were criticized for being slow. However, things are completely different now. The new JVMs are significantly faster. And, the CPU that executes JVM are also getting more and more powerful.
Now, Java is one of the fastest programming languages. Well optimized Java code is nearly as fast as lower level languages like C/C++, and much faster than Python, PHP etc. - Java is secure
The Java platform provides various features for security of Java applications. Some of the high-level features that Java handles are:
- provides secure platform for developing and running applications
- automatic memory management, reduces memory corruption and vulnerabilities
- provides secure communication by protecting the integrity and privacy of data transmitted - Large Standard Library
One of the reasons why Java is widely used is because of the availability of huge standard library. The Java environment has hundreds of classes and methods under different packages to help software developers like us. For example,java.lang
- for advanced features of strings, arrays etc.java.util
- for data structures, regular expressions, date and time functions etc.java.io
- for file i/o, exception handling etc. Applications of Java
Java technology is everywhere, powering 3 billion devices worldwide. It's more than likely that you have used Java one way or the other. Here are some of the applications of Java.- Android apps - Java programming language using Android SDK (Software Development Kit) is usually used for developing Android apps.
- Web apps - Java is used to create Web applications through Servlets, Struts or JSPs. Some of the popular web applications written in Java are: Google.com, Facebook.com, eBay.com, LinkedIn.com etc.
It's important to note that, these sites may not be entirely written in Java, and may use other programming languages along with Java. - Software Development - Softwares like Eclipse, OpenOffice, Vuze, MATLAB etc use Java.
- Big Data Processing - You can use popular software framework like Hadoop (which itself is written in Java) to process Big Data. To use Hadoop, you need to understand Java programming.
- Trading System - You can build trading applications having low latency using the Oracle Extreme Java Trading Platform.
- Embedded Devices - While C/C++ programming languages are still popular choices for working with embedded systems, Oracle's Java Embedded technologies provide platform and runtime for billions of embedded devices like: televisions, SIM card, Blu-ray Disc players etc.
Besides these applications, Java is also used for game development, scientific applications (like natural language processing), and many others.- Learning a new programming language can be challenging. You will hear a lot of new terms which can be overwhelming for a newbie. So, we have decided to explain a few terms that you are likely to hear in the world of Java programming language.Note, this is not the complete list of Java Glossary. Instead, it's the list of terms you should know before you start learning Java programming.Java - Java is a set of technologies (programming language and computing platform) for creating and running software. However, Java is often used to refer Java programming language for simplicity.Java programming language - A powerful, general-purpose, platform-independent, object-oriented programming language.Java 8 - Java 8 is the latest major release for Java. Our Java tutorial will include all major features of Java 8.Java EE, Java ME and Java SE - Java EE, Java ME and Java SE stands for Java Platform Enterprise Edition, Micro Edition, and standard edition respectively.
Java EE is targeted for applications which run on servers. Java ME is targeted for resource limited devices like: embedded devices. And, Java SE is the basic Java environment used for creating standard programs.
If you are a java programming newbie, we recommend you to start with J2SE.JVM - JVM (Java Virtual Machine) is an abstract machine that enables your computer to run a Java program.JRE - JRE (Java Runtime Environment) contains JVM, supporting libraries, and other components to run a Java program. However, it doesn't contain any compiler and debugger.JDK - JDK (Java Development Kit) contains JRE and tools such as compilers and debuggers for developing Java applications. - Often, a program called Hello World is used to introduce a new programming language to beginners. It is a simple program that outputs
Hello, World!
. In this section, you will learn to write the same program in Java using Neatbeans- Open Eclipse.
- Go to File > New > Java Project
- Give the Project Name. We will call it Hello World for now and click Finish
- Now, you need to create a new Java class.
- Select Hello World project in the left sidebar. When the project is selected, go to File > New > Class and give Name to the class and click Finish. We will call it HelloWorld.
- Copy the following code in
HelloWorld.java
file and save it. (Shortcut: Ctrl +S, or Cmd +S for Mac)public class HelloWorld { public static void main(String[] args) { // prints "Hello, World!" System.out.println("Hello, World!"); } }
- Finally, hit run button. If everything goes right, you will see Hello, World! output on the screen.
- INTRODUCTION
- Java
Hello World
- Java
JVM, JRE and JDK
- Java
Data Types
- Java
Operators
- Java
Input and Output
- Java
Expressions & Blocks
- Java
Comment
FLOW CONTROL- Java
if...else
- Java
switch Statement
- Java
for Loop
- Java
for-each Loop
- Java
while Loop
- Java
break Statement
- Java
continue Statement
JAVA OOP NEXT- Classes
& Objects
- Java
Methods
- Java
Constructor
- Java
Recursion
- Java
this Keyword
- Java
Access Modifiers
- Java
garbage collection
- Java
Hello World
No comments:
Post a Comment