Java tutorial

Java was created under the influence of C++. You can even describe the main idea of Java - to be similar to C++, but more safer. For example, type int always 32 bit, fixed byte order, no pointers, built-in garbage collector.

Java is platform independent language. Code will be compiled to java bytecode and executed on java virtual machine (JVM). So Java designed for application development and not for system programming. But you have opportunity to use native code also.

Apart Java, there are some other languges that executed on JVM, like Kotlin. So you can mix several languages in one project, or just use java libraries.

Currently java is used for:

  • android applications
  • software products, for example Eclipse, OpenOffice, Gmail, Atlassian and etc.
  • finance/trading programs
  • big data programs, for example Hadoop


  1. Java was designed to be easy to use, write, compile, debug, and learn than other programming languages. Java is much simpler than C++ because Java uses automatic memory allocation and garbage collection.
  2. Java is designed for object oriented programming. Although at nowadays all popular languages support OOP.
  3. As mentioned above, Java is a platform independent language. Most platforms have jvm implementation. Thus, you can write the code once and execute it on any hardware / software platform.
  4. Java is the first programming language to include security an integral part of the design. JVM has a unique identifier that identifies the bytecode and verifies it before running it.
  5. Java is one of the programming languages to support multithreading.
  6. Java has rich APIs for application development.
  7. Java is one of the most reliable programming languages.


In some cases some benefits may become disadvantages.

  1. Although the JVM provides platform independence, it slows down application execution. But don't worry about JVM performance for regular application. At nowadays computers are quite powerful. Also modern JVM supports JIT compilation java bytecode to the machine code.
  2. With garbage collector we don't need think when we must free object. But we cannot say when the garbage collector should work. Calling System.gc() is a recommendation for the JVM. So you can see how application will hang for some time when garbage collector executes.
  3. The default look and feel of GUI applications written in Java is very different from native applications.