Friday, May 4, 2018

Introduction To The JAVA Language

Brief History Of JAVA

    In 1991, a group of Sun engineers led by Patrick Naughton and James Gosling wants to design a computer language for consumer devices such as cable TV Box. Because the device does not have a lot of memory, the language should be smaller and contain the code. Also because of the manufacture different choose different processor, then the language should free of any manufacturing. The project was given the code name "Green".

    The need for flexibility, small, clay, and code that toward the neutral platform take a team studying the implementation of Pascal ever attempted. Niklaus Wirth, the creator of Pascal has designed a portable language that generates intermediate machine code for the hypothesis. These machines are often referred to as the machine Maya (virtual machine). This code can then be used on any machine
that has interpreters. Project Green using virtual machines to cope with the main issues about neutral against the architecture of the machine.

    Because people-people in Project Green-based C++ instead of Pascal then most syntax taken from C++, as well as adopt the object orientation and not
procedural. At first, the language was created named "Oak" by James Gosling who gets inspiration from a tree on the opposite side of his Office, However, due to the name of the Oak itself is the name of a programming language It has been there before, then replaced it with SUN JAVA. The Name Of The JAVA himself inspired by the time they are enjoying a cup of coffee in the coffee shop which was later unintentionally one of them mention the word JAVA containing ore origin meaning coffee. Eventually, they agreed to name the name of the programming language Java.

     The first product is a Green Star Project 7 (* 7), a remote control that very smart. Because the market is still not interested in consumer products smart then Project Green will have to find another market of technology created. At the same time, implementation of the WWW and the Internet is experiencing rapid development. On the other hand, members of the project Green alsorealize that Java can be used on internet programming so that the application of further leads into a technology that plays a role in the web.

Java has been accommodating almost all important features of the language – language existing programming since the development of modern human computing:

  1. from the SIMULA language, in 65 's, a language that most affect Java C++ at once. From this language adopted some form of basic form – object-oriented programming.
  2. from LISP – language year 55. Adopted facilities garbage collection, as well as the ability to mimic generic list processing, although it rarely that exploit it.
  3. from Algol – language in 60 's, taken the control structure It owns.
  4. in C++, the syntax is adopted, most semantic and exception handling
  5. From There, taken strongly type, and exception handling.
  6. From Objective C, taken on-site interface.
  7. From the SmallTalk, taken the approach of single-root class hiérarchie, where the object is a single entity inheritance hierarchy
  8. From the Eiffel language, assertion facility which began to be applied in most JDK 1.4


What is JAVA Technology?


a. A programming language
   As a programming language, Java can make the entire application form, desktop, web, and others, as it is created by using the language another conventional programming. Java is a programming language that is object-oriented (OOP) and can run on a variety of operating system platforms. Not only does Java development focused on one operating system, but were developed for various systems operations and is open source.

b. A Development Environment
    As an equipment Builder, Java technology provides a lot of tools: compilers, interpreters, compilers, documentation of the package class and so on.

c. An application
    The application of Java technology, in General, is a versatile application that can run on the entire machine that has a Java Runtime Environment (JRE).

d. A Deployment Environment
    There are two main components of the Deployment Environment. The first is the JRE, which is found in the J2SDK package, containing a class – the class for all packages the Java technology that includes a base class of the Java GUI components, and so on. The other component is present on the Web Browser. Almost all Web browsers commercial provides interpreters and runtime environment from Java technology.

Why Learn JAVA?

Based on the official white paper from SUN, Java has the following characteristics:
  1. Simple, The Java programming language uses a syntax similar to C++, however, the syntax on Java has much improved especially eliminating the use of the pointer are complicated and multiple inheritances. Java also uses automatic memory allocation and memory garbage collection.
  2. Object-oriented (Object Oriented), Object-oriented programming using Java programs can be created in a modular and can be used again. Programming object-oriented model the real world into objects and do interactions between the objects.
  3. Can be distributed easily, Java distributed applications made easy with the integrated networking libraries in Java.
  4. Interpreters, The Java program is run using the interpreter that is Java Virtual Machine (JVM). This causes the Java source code that has been compiled into Java bytecodes can be run on different platforms.
  5. Robust, Java has a high reliability. The compiler in Java has the ability to detect errors in a more thorough comparison of languages other programming. Java has a runtime-Exception handling for help resolve the error in programming.
  6. secure. As a programming language for the internet and distributed application, Java has some security mechanisms to safeguard the application does not use to damage the computer system running the application such.
  7. Architecture Neutral. The Java program is platform independent. The program has enough one version that can be run on different platforms with The Java Virtual Machine.
  8. Portable. Source code or Java program can easily be brought to a platform different without being compiled.
  9. Performance. Performance in Java is often said to be less high. However the performance Java can be upgraded using another Java compilation as artificial Inprise, Microsoft nor Symantec are using Just In Time Compilers (JIT).
  10. Multithreaded. Java has the ability to create a program that can do some work at once and simultaneous.
  11. Dynamic. Java was designed to be run in a dynamic environment. Changes at a class by adding properties or methods can be done without interrupting programs that use the class

Some of the features of JAVA

  1. the Java Virtual Machine (JVM), JVM is an imaginary machine (virtual) that works with the application resemble on a real machine. The JVM provides hardware and platform specifications where the compilation of Java code happens. This is what makes the application specifications Java-based be free from any platform because of the process of compilation completed by the JVM. The application of Java programs created with the text file with extension. java. This program compiled bytecode files produced one with extension. class. Bytecode is a series of machine code instructions similar instructions. The difference is machine code must be run on the computer system where the compilation addressed, while bytecode runs on a java interpreter that is available in the all platforms computer systems and operating systems.
  2. Garbage Collection. Many other languages programming examples that allow a programmer allocates memory at the time it is run. However, after using the allocation the memory, there must be a way to put back the memory blocks so that other programs can use it. In C, C++, and languages the other is the absolute programmer will be responsible for this. This It can be difficult when the programmer alpha to restore block the memory is causing a situation known as memory leaks». Java program performs garbage collection which means no need to program Delete own objects – objects that are no longer used. This facility reduces the load the memory management by the programmer and reduce or eliminate the largest source of error in the language that allows the allocation of dynamic.
  3. Code Security, Security Code implemented in Java through the use of Java Runtime Environment (JRE). The Java security model uses 3 layers to protect systems from untrusted Java Code.
  •  first, class-loader handles the loading of the Java classes to the runtime interpreters. This process provides safeguards by separating class – classes that derive from local disk with class – a class derived from the network. This limits the application of a Trojan because classes class derived from the local disk that is loaded first.
  • Second, the bytecode verifier read bytecode before it is executed and ensure the bytecode meet rules – basic rules of language Java.
  •  Third, security management application level security with handle controls whether the program has the right to access resources such as the file system, network ports, external systems and windowing process.
After the entire process is finished running, the program code in the execution. Java also provides various other security techniques:

  • language designed to be code execution destroyer. Counteraction a pointer is a major step up security. Java does not know the operation pointer. In the hands of the programmer, the pointer operations wonderful for optimization and creation of an efficient program as well as awesome. However, this mode can be a disaster in the presence of malicious programmers. The pointer is an incredible means to access could not be authorized. Pointer operations, counteraction with the Java language can be which is more secure.
  • Java has some safeguards against the applet. To prevent the program acts to interfere with the storage media, then applets cannot allow opening, read or write to the file in carelessly. Because the Java applet can open a browser window recently, then the window has a Java logo and text identification of the window that is opened. This prevents pop-up Windows cheats as request username and password information.

 JAVA programming phase

The picture below describes the process flow of a compilation and execution
Java programs
java programming phase


The first step in the creation of a Java-based program is writing the program code in the text editor. Example of a text editor that can be used for example notepad, vi, emacs, etc. Program code created
then stored in a file with extension. java.
After you create and save a program code, compiling files that contain code the program using the Java Compiler. The result of the compilation of the form bytecode files with the extension. class.
The file containing the bytecode will then be converted by Java Interpreters into machine language in accordance with the type and platform being used.



EmoticonEmoticon