What is Java??

image

Java as one of the existing programming languages ​​from the era of the 1990s that is now developing and widening its dominance in various fields. One of Java's biggest uses is in making native apps for Android.

Many programmers or academics who use this programming language to create a program, work on the project or complete the end task with the topic of mobile application, web, data mining, etc.



Kontributor:

Hernandra Al Harits



What is Java ?

Java is a programming language that can create all forms of application, desktop, web, mobile and more. Java programming language has a style that is object-oriented programming or better known as OOP (Object Oriented Program.Java adopts the style of language from C and C ++ by taking advantage of it and leave the lack of the language.Java programming language can run in every operating system, therefore java widely used by many programmers.Java has a slogan of "Write once, run anywhere" or also called "Write once, run wherever".


History

Java was released in 1995, originally the programming language created was named "OAK" the name "OAK" was taken because there was an oak outside James Gosling's window, but later changed to "Java" in 1995 because the name "OAK" has been copyrighted and used in a software product as well. Oak is changed to java because at the time of doing this project James Gosling loves to drink coffee, which is known coffee is a coffee tubruk derived from "JAWA" or better known by people there with "JAVA".


Main Components Java Platform

Platforms can be defined as the hardware or software environment in which the program is run.  Generally platforms based on the name of the operating system used, such as Windows 2000, Linux, Solaris, or MacOS. For the Java platform consists of 2 main components, namely:

  1. Java Virtual Machine (JVM)
    JVM (Java Virtual Machine) is an imaginary machine (virtual) that works by resembling an application on a real machine. JVM provides hardware and platform specifications where Java code compilation occurs. This specification makes Java-based applications to be free from any platform because the compilation process is completed by JVM. Java application program created with text file with java extension. This compiled program generates a byte file extension of .class or more.By the code is a series of instructions similar to machine code instructions. The difference is that machine code should run on a computer system where compilation is intended, while bytecode runs on a java interpreter available on all platforms of computer systems and operating system

  2. Java Application Programming Interface (JAVA API)
    The Java API is a ready-made component and JAVA class, which has various capabilities. Ability to handle objects, strings, numbers, etc. In the API there are functions or commands to replace the language used in system calls with a more structured language and easily understood by the programmer. The Java API consists of three main parts:
    1. Java Standard Edition (SE), an API standard for designing desktop applications and applets with basic languages ​​that support graphics, security, database connectivity and networking.
    2. Java Enterprose Edition (EE), an API initiative for designing server applications with support for databases.
    3. Java Macro Edition (ME), an API for designing applications that run on small devices such as mobile phones, handheld computers and pagers.


General Glossary on Java

  1. JRE
    JRE (Java Runtime Environment) is software used to run applications built using java. The JRE version must be the same or higher with the JDK that is used to build java applications.
  2. JDK
    JDK (Java Development Kit) is software used to compile from java code to bytecode that can be understood and can be run by JRE (Java Runtime Envirotment).
  3. JVM
    JVM (Java Virtual Machine) function to change the language of the program that friend to become machine language
  4.   IDE
    IDE (Integrated Development Environment) is a device developer application to build a software just like code editor, debugger, compiler, and so on.

 

Excess Java

  1.  Multiplatform
    The main advantage of Java is that it can run on the computer platform / operating system, according to the slogan "write once, run anywhere". With these advantages programmers simply write a Java program and compile it (changed, from a human-understandable language to machine language / bytecode) once and then the results can run on multiple platforms without change. using its own program (which can be downloaded from the Java website) to interpret the bytecode.

  2. OOP (Object Oriented Programming - Object Oriented Program)
    OOP means that all aspects of Java are Objects. Java is one of the purely object-based programming languages. All data types are derived from a base class called Object. This greatly facilitates programmers to design, create, develop and allocate the fault of a program with Java base quickly, precisely, easily and organized.

  3. Complete Class Library
    Java is famous for its complete library (a collection of programming programs included in java programming) that greatly facilitates the use by programmers to build their applications.


Lack of Java

  1. Write once, run anywhere
    There are still some incompatibilities between platform one with other platforms. For J2SE, for example SWT-AWT bridge which until now does not work on Mac OS X.

  2. Easy to recompile
    Decompilation is the process of reversing the finished code into source code. This is possible because Java's finished code is a bytecode that stores many high-level language attributes, such as class names, methods, and data types. Thus, the algorithm used by the program will be more difficult to hide and easily hijacked / direverse-engineer.

  3. Much memory usage
    Memory usage for Java-based programs is much larger than previous generation high-level languages ​​such as C / C ++ and Pascal (more specifically, Delphi and Object Pascal). Usually this is not a problem for those who use the latest technology (because of the increasingly cheap memory trends), but a problem for those who still have to struggle with computer machines older than 4 years.


Sample Java Program

 

clip_image002

Explanation from example above

public is a keyword in Java indicating that the object, method, or attribute can be accessed from another class. class is keyword in Java to create a Class. In the example above we create a class named HelloWorld. Play shows that the block is the main program. And we will use the String [] parameter for java program. System.out.println () is an automatically imported method used to print output.


Application of java program

making simple apps with java. we will use NetBeans IDE to create the program :

clip_image002[4]

First step, click the File menu then select New Project. Then the dialog will appear to select the type of project to be created. Select Java application, then Next

clip_image004

Second, change the name of the project as you wish, then click the Finish button


clip_image005

The third step, java application project has been completed, then the editor will appear. Add the following syntax in the main method

System.out.println(“Hello World”);

clip_image006

clip_image007

Compile the program we have created by pressing the f9 key, if there is no error we can immediately run the application by pressing the f6 key. It will display the output of the syntax we have created that displays the text "Hello World"

Conclusion

Java is a programming language that can create all forms of application, desktop, web, mobile and more. Java programming language has a style that is object-oriented programming or better known as OOP (Object Oriented Program.Java adopts the style of language from C and C ++ by taking advantage of it and leave the lack of the language.Java programming language can run in every operating system, therefore java widely used by many programmers.Java has a slogan of "Write once, run anywhere" or also called "Write once, run wherever".

Popular posts

Intelligent agent

Sistem informasi global dan penerapannya oleh perusahaan multinasional

Apa itu budaya global?