Java is an object-oriented programming language developed by Sun Microsystems as a core part of its Java platform which was released in 1995 (Lemay & Perkins, 1996; Java – Overview, n.d.). The development was led by James Gosling in 1991 (Horstmann, 2013; Java – Overview, n.d.; Java Fundamentals, n.d.). The language lets the developers to “write once, run anywhere” (WORA), and this gives Java the characteristic of being platform-independent (Java – Overview, n.d.; Java Fundamentals, n.d.). Its application to real world solutions ranges from personal computer up to mobile devices.
Like other computer programs, Java source codes are translated into a machine language – binary language. This binary language is a set of zero’s and one’s that the computer only understands. However, there is a distinction to a Java-written program. Yes, it is translated into binary codes but it does not run directly under the computer system. Java programs run under the Java Virtual Machine installed in a computer system (download and installation of Java Runtime Environment is needed).
Characteristics of Java
- Object-oriented. Everything in Java is an object.
- Simple. Easy to learn and use.
- Platform-independent. Java can execute in any computer system provided there is a Java run-time system present in it (Horstmann, 2013; Java – Overview, n.d.; Java Fundamentals, n.d.).
- Architecture-neutral. Java programs are not compiled for a specific processor and/or operating system (Java Fundamentals, n.d.). This is because Java programs run under the Java Virtual Machine or JVM (Java – Overview, n.d.).
- Secure. It enables to develop virus-free programs or software (Horstmann, 2013; Java – Overview, n.d.).
- High performance. Java uses Just-In-Time (JIT) compilers. A JIT compiler compiles code only if needed during an execution (Rouse, 2005).
- Multi-threaded. Java programs can perform several tasks simultaneously (Java – Overview, n.d.).
- Case-sensitive. In Java, “Name” is different from “name”.
Here is an example of a simple java program:
public class first {
public static void main(String []Naufal) {
System.out.println("Hello world, this is my first java program :D");
}
}
To write your Java programs, you will need a text editor. There are even more sophisticated IDEs available in the market. But for now, you can consider one of the following: ·
To write your Java programs, you will need a text editor. There are even more sophisticated IDEs available in the market. But for now, you can consider one of the following: ·
- Notepad: On Windows machine, you can use any simple text editor like Notepad (Recommended for this tutorial), TextPad. ·
- Netbeans: A Java IDE that is open-source and free, which can be downloaded from here. ·
- Eclipse: A Java IDE developed by the eclipse open-source community and can be downloaded from here.
0 Comments:
Posting Komentar