Saturday, February 23, 2013

Core Java Tutorial




What is Java technology and why do I need it?

Java is a programming language and computing platform first released by Sun Microsystems in 1995. It is the underlying technology that powers state-of-the-art programs including utilities, games, and business applications. Java runs on more than 850 million personal computers worldwide, and on billions of devices worldwide, including mobile and TV devices.
Why do I need Java?
There are lots of applications and websites that won't work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
Is Java free to download?
Yes, Java is free to download. Get the latest version at http://java.com.
If you are building an embedded or consumer device and would like to include Java, please contact Oracle for more information on including Java in your device.
 
Why should I upgrade to the latest Java version?
The latest Java version contains important enhancements to improve performance, stability and security of the Java applications that run on your machine. Installing this free update will ensure that your Java applications continue to run safely and efficiently.
TECHNICAL INFORMATION 
Originally called OAK, it was renamed as the Java programming language in 1995.
What will I get when I download Java software?
The Java Runtime Environment (JRE) is what you get when you download Java software. The JRE consists of the Java Virtual Machine (JVM), Java platform core classes, and supporting Java platform libraries. The JRE is the runtime portion of Java software, which is all you need to run it in your Web browser. When you download Java software, you only get what you need - no spyware, and no viruses.
What is Java Plug-in software?
The Java Plug-in software is a component of the Java Runtime Environment (JRE). The JRE allows applets written in the Java programming language to run inside various browsers. The Java Plug-in software is not a standalone program and cannot be installed separately.
I've heard the terms Java Virtual Machine and JVM. Is this Java software?
The Java Virtual Machine is only one aspect of Java software that is involved in web interaction. The Java Virtual Machine is built right into your Java software download, and helps run Java applications.
What are the Java features?

List the basic features that make Java a powerful and popular programming language:
Platform Independence: The Write-Once-Run-Anywhere ideal has not been achieved (tuning for different platforms usually required), but closer than with other languages.
Object Oriented: Object oriented throughout - no coding outside of class definitions, including main().An extensive class library available in the core language packages.
Compiler/Interpreter Combo: Code is compiled to bytecodes that are interpreted by a Java virtual machines (JVM).This provides portability to any machine for which a virtual machine has been written.The two steps of compilation and interpretation allow for extensive code checking and improved security.
Robust: Exception handling built-in, strong type checking (that is, all data must be declared an explicit type), local variables must be initialized. 
Several dangerous features of C & C++ eliminated:
No memory pointers
No pre-processor
Array index limit checking
Automatic Memory Management: Automatic garbage collection - memory management handled by JVM.
Security:  No memory pointers
Programs runs inside the virtual machine sandbox.
Array index limit checking
Code pathologies reduced by
bytecode verifier - checks classes after loading
class loader - confines objects to unique namespaces. Prevents loading a hacked "java.lang.SecurityManager" class, for example.
security manager - determines what resources a class can access such as reading and writing to the local disk.
Dynamic Binding: The linking of data and methods to where they are located, is done at run-time.
New classes can be loaded while a program is running. Linking is done on the fly.
Even if libraries are recompiled, there is no need to recompile code that uses classes in those libraries.

This differs from C++, which uses static binding. This can result in fragile classes for cases where linked code is changed and memory pointers then point to the wrong addresses.
Good Performance: Interpretation of bytecodes slowed performance in early versions, but advanced virtual machines with adaptive and just-in-time compilation and other techniques now typically provide performance up to 50% to 100% the speed of C++ programs. 
Threading: Lightweight processes, called threads, can easily be spun off to perform multiprocessing.
Can take advantage of multiprocessors where available
Great for multimedia displays.
Built-in Networking: Java was designed with networking in mind and comes with many classes to develop sophisticated Internet communications.


No comments:

Post a Comment