ABSTRACT

Th e Java language derived much of its syntax from C and C++, but the object model is much simpler and has fewer low-level facilities. If you remember, we mentioned in Chapter 3 that one of the security risks in C/C++ is that as it provides low-level functions, hackers can exploit it. As Java removes many of them, it is more secured. Also, it provides additional security functions that make it safer as a framework. Java applications are compiled to a bytecode that can run on any Java Virtual Machine (JVM) independent of the operating system. Th e main features of Java language are

1. Platform independence. Th e philosophy of platform independence is that one should be able to write a code once and run it anywhere, on any platform. Th is is achieved by the Java compiler that produces an intermediate bytecode that can be understood by any JVM. Th e JVM, which is a program that is written in the native code and runs on the specifi c platform, interprets and executes the bytecode. Th e earlier implementations of Java used an interpreted virtual machine to execute the bytecodes, which made the execution of Java programs slower than programs compiled to native executables like C and C++. However, most of the recent implementations use a technique called as just-in-time compilation, which makes the execution faster.