Java is a programming language developed by James Gosling from Sun Microsystems in 1991. The first public available version of Java (Java 1.0) was released 1995. Over time several version of Java were released which enhanced the language and its libraries.
The current version of Java is Java SE 10 (18.3) .The main components of java language are compiler java virtual machine and Java class libraries.
- The Java virtual machine (JVM) is a software implementation of a computer that executes programs like a real machine.
- The Java compiler translates Java coding into byte-code.
- The Java virtual machine interprets this byte-code and runs the program.
- The Java virtual machine is written specifically for a specific operating system.
- The Java runtime environment (JRE) consists of the JVM and the Java class libraries.
Learn Java Basics
Core Java tutorial with Examples
-
Core Java Basics
Core java basic tutorials with examples in easy ways by expert and experienced team .
-
Core Java Examples
Set by set core java examples your learning for fresher as well as experienced professionals .
-
Core Java Tutorials
Core Java Tutorials with examples in easy way.
-
Collections
Collections frameworks ,classes and interfaces and Collection examples
-
Some Hot Topic
Some hot(main) topics of Java Programming language
-
Exception Handling
Exception Handling ways ,examples classes and interfaces
-
String
String methods , concepts and examples
-
Thread
Thread basics ,implementing of Thread using Runnable Interface and examples.
-
JDK1.5
JDK 1.5 new features ,new classes ,new methods and interface concepts and deprecated methods classes ,interfaces
-
JDK1.6
JDK 1.6 new features ,new classes ,new methods and interface concepts and deprecated methods classes ,interfaces
-
JDK 7
JDK7 new features ,new classes ,new methods and interface concepts and deprecated methods classes ,interfaces
-
JDK8
JDK 8 new features ,new classes ,new methods and interface concepts and deprecated methods classes ,interfaces
-
Java Networking
Java.Net is the practice of linking two or more computing devices.
-
Java.IO
Java.io package provides classes for system input and output through data streams
-
Java.Util
Java.util package contains the collections framework, legacy collection classes.
-
Java.Lang
Java.lang is most fundamental package provides classes.
Simple: Programs are easy to write and debug because java does not use the pointers explicitly. It is much harder to write the java programs that can crash the system but we can not say about the other programming languages.
Object-orientated programming language Except the primitive data types, all elements in Java are objects.
Automatic Memory Management: Automatic garbage collection - memory management handled by JVM
Dynamic: User can access the files from the any location from local system or from anywhere location
Distributed: Using protocols like HTTP and FTP
Portable: The feature Write-once-run-anywhere makes the java language portable provided that the system must have interpreter for the JVM.
Security: Java is secure because java do not used memory pointers explicitly. programs are run inside the JVM sand box
Platform independent: Write once run anywhere makes java platform independent
Java technology as programming language and a platform. Java technology is a simple, secure, robust, object oriented and platform independent high level programming language. Java is portable, high performance, multi-threaded and network security provider that enable it in constructing software that can run along in small machines. The whole technology is based on the concept of Java Virtual Machine (JVM) that acts as translators of byte code into machine language.
Java is high level programming language .As java provide Java technology as programming language and a platform. Java technology is a simple, secure, robust, object oriented and platform independent high level programming language.The whole technology is based on the concept of Java Virtual Machine (JVM) that acts as a translators of byte code into machine language.
There are three editions of java technology
- JAVA SE: Java standard edition provide Tolls and APIs that you can use to create server applications ,desktop application, and applets Programs developed using SE edition can run on any operating system. like Linux, Macintosh, Solaris and Windows.
- J2EE: Java Enterprise Edition helps in web application service, component model and enterprise class service oriented architecture (SOA).
- J2ME: Java Micro edition is basically used for development of software for small devices like mobile phones ,game programming ,PDAsetc.
The programmer writes Java source code in an text editor which supports plain text. IDE (integrated development environment )is required for programming .
- An IDE support the programmer in the task of writing code, e.g. it provides auto-formatting of the source code, highlighting of the important keywords, etc.
- The Java compiler creates platform independent code which is called byte code.
- This byte-code is stored in ".class" files. Byte code can be executed by the Java runtime environment.
The Java runtime environment (JRE) is a program which knows how to run the byte code on the operating system. The JRE translates the byte code into native code and executes.
The Classpath is the connection between the Java compiler and Java interpreter. It defines where the compiler and interpreter look for .class files to load
Java API is a set of classes and interfaces which comes with the JDK.
Java API is basically a huge collection of library routines that performs basic programming tasks .
- All java classes and interfaces are packaged in packages.
- These classes are written in Java and runs on the JVM.
- Java classes are platform independent but JVM is not platform independent.
- You will find different downloads for each OS.
A Simple Java Program Write the program using note pad for window system or either used net bean or eclipse these are the IDE for program writing.following program is written in note pad.
public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } }
- Open the command prompt
- Type cd javadir, for example in my case cd c:\r4r\java.
- Use the command dir to see that the source file is in the directory then on command prompt write javac Hello.java (File saved with the name of class here file is saved with Hello.java ,. java is the extension of jav files)
- Run The Java Program write java hello world on command prompt to run the program.
For More Read http://r4r.co.in/java/corejava/java_basic_tutorial/how_to_install_jdk.shtml