Introduction to JAVA – User friendly Tech help
Have faith, love and courage to learn and share with others.That is what we at uftHelp believe in.
n
nWe are starting this series of tutorials with focus on JAVA programming language.Do follow us on Fb,G+,Twitter for more updates.n
History:-
nIt kick-started in 1991, when a group of Sun Microsystem engineers team (called as Green Team, led by James Gosling) put up their efforts to create a language for digital devices such as set-top boxes, televisions etc.Initially it was as named “Oak”(The name Oak was used by Gosling after an oak tree that stood outside his office.) but as this was the trade mark of Oak Technologies, new name JAVA came into existence.
n
nThe first publicly available version of Java (Java 1.0) was released on 27 May,1995.After that it became the most popular programming languages,and knowingly or unknowingly it is integral part of our daily lives —from mobile phones to handheld devices, games and navigation systems to e-business solutions, Java is everywhere—
n
nSun Microsystems was later acquired by the Oracle Corporation in 2010.
n
We can check and download the latest version of Java.
n
nKey Features:-
n
object oriented:-Apart from primitive data types(like int,Boolean), all elements in Java are objects.
n
nplatform independent: Java programs use the Java virtual machine(JVM) to run the java program on the operating system directly. This makes Java programs highly portable.Thus making the code run on Windows or Linux.
n
ninterpreted and compiled language: Java source code is transferred into the bytecode format which does not depend on the target platform. Further JVM interprets these bytecode instructions and translates them into native code
ninstructions which can be understood by operating system.
n
nStrongly-typed programming language: Contrary to VbScript which is loosely typed, Java is strongly-typed,i.e. we need to declare the variable before using it and conversion to other objects is relatively strict,like it must be done in most cases by the programmer.
n
automatic memory management: Java manages the memory allocation and de-allocation for creating new objects. The program does not have direct access to the memory. This feature of garbage collector automatically deletes objects to which no active pointer exists.
n
nWrite Once Run Anywhere!!
nJava is known as platform independent why? Because It has the ability to run the same program on many different hardware configurations and operating systems.
n
nThis is possible because of JVM.It makes Java as a portable and platform independent language.
n
n
nWhen the Java code is compiled, an intermediate code state is created called as the bytecode.This bytecode is then converted to Machine code (Native code) by JVM.
n
nThe JVM varies across platforms,But the bytecode generated by the compiler is same everytime.The JVM performs the function of handling the bytecode and producing executable code in the form as is understood by the platform on
nwhich we are working on.This is the reason that java is called as “Write Once Run Anywhere”.
n
nNote:-
n
- n
- The bytecode is platform independent but the machine code generated by JVM is platform dependent. JVM forms the Java Runtime Environment (JRE) for the program execution. Each operating system and CPU architecture requires a different JRE.
- The Java virtual machine is called “virtual” because it is an abstract computer (that runs compiled programs) between the compiled Java program and used hardware and operating system.It loads the appropriate class files for executing a Java Program, and then to execute it.
n
n
n
JRE v/s JDK v/s JVM
nLearn Selenium
nMore Java Tutorials
n
n