Java Programing laungage

Core Java

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 1.6also known as Java 6.0. 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.

Important Java Tutorials
Java Packages Tutorials
Some Basics Java Topics and Interview Questions

 

Features of Java

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

Basics of Java Technology

Java technology as programming language and a platform. Java technology is a simple, secure, robust, complete object oriented and platform independent high level programming language. Java is portable, high performance, multithreaded 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 JavaVirtual Machine (JVM) that acts as translators of byte code into machine language.

Importance of Java Technology

Java is high level programming language .As java provide Java technology as programming language and a platform. Java technology is a simple, secure, robust, complete 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.

Editions of Java Technology

There are three editions of java technology

  1. 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.
  2. J2EE: Java Enterprise Edition helps in web application service, component model and enterprise class service oriented architecture (SOA).
  3. J2ME: Java Micro edition is basically used for development of software for small devices like mobile phones ,game programming ,PDAsetc.
Development of Java Program

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.

Class Path

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

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.

Fundamental Programming Structures in Java

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!");
	}
}
Compilation of a program

Open the command prompt and write 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.


Tolal:1 Click: 1
Username :Ankush Chauhan
Comments :The Java contents on this page is not up to date. Current Java version is 1.8 and in document it is written as 1.6. Please update document.
URL :http://r4r.co.in/java/corejava/

1

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: