Which language is used in java

What is Java? A Brief History about Java

Java is a General Purpose, class based, object oriented, Platform independent, portable, Architecturally neutral, multithreaded, dynamic, distributed, Portable and robust interpreted Programming Language.

What is Java and Brief History about Java

Why Java is a called:

General Purpose

Java capabilities are not limited to any specific application domain rather it can be used in various application domain and hence it is called General Purpose Programming Language.

Class based

Java is a class based/oriented programming language which means Java supports inheritance feature of object-oriented Programming Language.

Object oriented

Java is object-oriented means software developed in Java are combination of different types of object.

Platform Independent

A Java code will run on any JVM (Java Virtual Machine). Literally you can run same Java code on Windows JVM, Linux JVM, Mac JVM or any other JVM practically and get same result every time.

Java Platform Independent

Architecturally Neutral

A Java code is not dependent upon Processor Architecture. A Java Application compiled on 64 bit architecture of any platform will run on 32 bit (or any other architecture) system without any issue.

Multithreaded
A thread in Java refers to an independent program. Java supports multithread which means Java is capable of running many tasks simultaneously, sharing the same memory.

Dynamic

Java is a Dynamic programming language which means it executes many programming behavior at Runtime and don’t need to be passed at compile time as in the case of static programming.

Distributed

Java Supports distributed System which means we can access files over Internet just by calling the methods.

Portable

A Java program when compiled produce bytecodes. Bytecodes are magic. These bytecodes can be transferred via network and can be executed by any JVM, hence came the concept of ‘Write once, Run Anywhere(WORA)’.

Java Concept

Robust

Java is a robust programming Language which means it can cope with error while the program is executing as well as keep operating with abnormalities to certain extent. Automatic Garbage collection, strong memory management, exception handling and type checking further adds to the list.

Interpreted

Java is a compiled programming Language which compiles the Java program into Java byte codes. This JVM is then interpreted to run the program.

Other than the above discussed feature, there are a few other remarkable features, like:

Security

Unlike other programming Language where Program interacts with OS using User runtime environment of OS, Java provides an extra layer of security by putting JVM between Program and OS.

Java Security

Simple Syntax

Java is an improved c++ which ensures friendly syntax but with removed unwanted features and inclusion of Automatic Garbage collection.

High Level Programming Language

Java is a High Level Programming Language the syntax of which is human readable. Java lets programmer to concentrate on what to achieve and not how to achieve. The JVM converts a Java Program to Machine understandable language.

High Performance

Java make use of Just-In-Time compiler for high performance. Just-In-Time compiler is a computer program that turns Java byte codes into instructions that can directly be sent to compilers.

History of Java

Java Programming Language was written by James Gosling along with two other person ‘Mike Sheridan‘ and ‘Patrick Naughton‘, while they were working at Sun Microsystems. Initially it was named oak Programming Language.

Java Releases
  1. Initial Java Versions 1.0 and 1.1 was released in the year 1996 for Linux, Solaris, Mac and Windows.
  2. Java version 1.2 (Commonly called as java 2) was released in the year 1998.
  3. Java Version 1.3 codename Kestrel was released in the year 2000.
  4. Java Version 1.4 codename Merlin was released in the year 2002.
  5. Java Version 1.5/Java SE 5 codename ‘Tiger’ was released in the year 2004.
  6. Java Version 1.6/Java SE 6 Codename ‘Mustang’ was released in the year 2006.
  7. Java Version 1.7/Java SE 7 Codename ‘Dolphin’ was released in the year 2011.
  8. Java Version 1.8 is the current stable release which was released this year (2015).

Five Goals which were taken into consideration while developing Java:

  1. Keep it simple, familiar and object oriented.
  2. Keep it Robust and Secure.
  3. Keep it architecture-neural and portable.
  4. Executable with High Performance.
  5. Interpreted, threaded and dynamic.

Why we call it Java 2, Java 5, Java 6, Java 7 and Java 8, not their actual version number which 1.2, 1.5, 1.6, 1.7 and 1.8?

Java 1.0 and 1.1 were Java. When Java 1.2 was released it had a lots of changes and marketers/developers wanted a new name so they called it Java 2 (J2SE), remove the numeric before decimal.

This was not the condition when Java 1.3 and Java 1.4 were released hence they were never called Java 3 and Java 4, but they were still Java 2.

When Java 5 was released, once again it was having a lots of changes for the developer/marketers and need a new name. The next number in sequence was 3, but calling Java 1.5 as Java 3 was confusing hence a decision was made to keep the naming as per version number and till now the legacy continues.

Places where Java is used

Java is implemented over a number of places in modern world. It is implemented as Standalone Application, Web Application, Enterprise Application and Mobile Application. Games, Smart Card, Embedded System, Robotics, Desktop, etc.

Keep connected we are coming up with “Working and code Structure of Java”.

Источник

In which language are the Java compiler and JVM written?

In which languages are the Java compiler ( javac ), the virtual machine (JVM) and the java starter written?

10 Answers 10

The precise phrasing of the question is slightly misleading: it is not «the JVM» or «the compiler» as there are multiple JVM vendors (jrockit is one, IBM another) and multiple compilers out there.

  • The Sun JVM is written in C , although this need not be the case — the JVM as it runs on your machine is a platform-dependent executable and hence could have been originally written in any language. For example, the original IBM JVM was written in Smalltalk
  • The Java libraries ( java.lang , java.util etc, often referred to as the Java API) are themselves written in Java, although methods marked as native will have been written in C or C++ .
  • I believe that the Java compiler provided by Sun is also written in Java. (Although again, there are multiple compilers out there)

Actually, one library in Sun’s JRE is written in NetRexx. (It’s one of the arbitrary precision math libraries, either BigInteger, BigNum or BigDecimal. I forgot which one.) In theory, you could use any language to implement the JRE, as long as it can compile to a representation that a Java program can understand.

The very first Java compiler was developed by Sun Microsystems and was written in C using some libraries from C++. Today, the Java compiler is written in Java, while the JRE is written in C.

We can imagine how the Java compiler was written in Java like this:

The Java compiler is written as a Java program and then compiled with the Java compiler written in C(the first Java compiler). Thus we can use the newly compiled Java compiler(written in Java) to compile Java programs.

fyi this process of «upgrading» to new compilers by compiling their code in more basic compilers is called «bootstrapping», as in «pulling yourself up by your bootstraps», which is where «booting» a machine comes from. Computerphile on YouTube has a good video about this and «T diagrams»

In theory, you dont’ even need the bootstraping compiler. You can refer to the Java Language Specification and manually translate the Java Compiler code into bytecode(class file), hence bootstrapping. Though I only tried manually do that with a HelloWorld.

Just clarifying, the JVM cannot be written in Java because Java needs JVM to run so if JVM-version2 was written in Java, it would have to run on JVM-version1, thus it would be a VM running on a VM.

Источник

Читайте также:  Пока не равно питон
Оцените статью