Java offers standardized libraries that enable programmers to access specific features such as graphics and networking for the target computers. In other words, if you want to run Java on a Windows computer you access program libraries that handle the details of communicating with the Windows graphics system.
Java has been accused of poor performance. To deal with this problem Java programs may generate output known as Java Bytecode that runs on a Java Virtual Machine. In theory the Java programmer need not be familiar with how Java Bytecode works, but some feel that programmer understanding of Java Bytecode improves the final product. In any case the two-stage process can lead to better performance. It must be pretty good, the number of devices that work with Java Virtual Machines was estimated at over 4 billion and that was way back in 2006.
Sun Microsystems insists that all implementations be “compatible”. In 2001 it won a $20 million judgement against Microsoft and Microsoft no longer ships Java with Windows. You can still run Java on Windows (I do but I am not a Java programmer) but access to the full suite of Java products is not a 1-2-3 operation.
Programmers traditionally start a new language by writing the Hello, world program. This program displays on the screen a single line. The Java version of Hello, world appears below:
// HelloWorld.java
public class HelloWorld {
public static void main(String[] args) {
System.out.println(“Hello, world!”);
}
}
In contrast the C language version of this program contains only 4 lines. XWindow is the Unix and Linux windowing system. The XWindow version of this program is more than two pages long. Clearly there is a lot happening behind the scenes.
Java applets are programs embedded in other applications, typically in a Web page displayed in a Web browser. Java servlets are similar to Java applets but run on the Web server. While Javascript is a popular, easy to use language for writing scripts (small programs) on the client computer it is not really related to the Java programming language.