Java features

Target audience

For those who want to study Java and those who are starting to study Java. I'm learning Java. I will post an article on qiita as an output so that I can use what I learned as my knowledge.

What you can do with Java

Smartphone apps, various web services, games, car navigation systems, etc. Typical services that use Java are

・ Twitter ・ Evernote ・ Rakuten ・ Mizuho Bank's system ·Mine Craft

And so on.

Suitable for large-scale development

Java is a well-established object-oriented language. Object-oriented is a programming orientation in which parts (objects) are divided and assembled. With Java, you can create a large-scale system with multiple people by separating parts for each function and combining them.

Processing speed is fast


Interpreters and compilers are two ways to run a program on a computer. Computers can only calculate binary numbers with "1" and "0". Instructions written in binary so that they can be interpreted by a computer are called "machine language". The interpreter reads the source code, converts it into machine language, and commands the computer. It takes time to process because it is converted each time it is executed. In addition, a compiler (conversion mechanism) is required at runtime. Examples of interpreted languages include Javascript, PHP, Ruby, and the like.


The compiler converts the source code into machine language in advance and instructs the computer. The program can be processed at high speed because there is no need to convert it again at runtime. Also, since no compiler is required, the program can be executed independently. Examples of compiler languages include Java, C, C ++, Objective-C, and C #.

Java with the best of interpreters and compilers

Java is a compiler language, but it also has the advantages of an interpreter. Java pre-converts source code into bytecode, which is intermediate code. When this bytecode is run in a virtual machine called JVM (Java Virtual Machine), the virtual machine can convert the bytecode into machine language and instruct the computer. This JVM is like an interpreter who manages a computer and Java, and with the JVM Java can run on any computer. The interpreter works on any platform if there is a "mechanism that converts the source code into machine language when the program is executed", but the execution speed is slow. If the compiler runs on a different platform, it will be necessary to change the source code for the platform and recompile it. To eliminate these disadvantages, Java uses a virtual machine to run bytecode.

Can be used in any environment

Since Java runs on the aforementioned virtual machine JVM and the "Java platform" that has the libraries required for various execution and development committees, it does not depend on the OS or hardware. It can be used on Mac, Windows and Linux.

Has garbage collection

When the program is executed, it goes through the following process.

  1. Read the information required for program processing into memory
  2. Execute processing based on the read information

The read information becomes unnecessary after processing. If you leave unnecessary information as it is, it will accumulate in memory and the processing speed of the program will slow down. Garbage collection is a function that throws away unnecessary information from memory after use. Garbage collection automatically determines the need for information and processes it without the programmer writing code for memory management. Java has this garbage collection by default.

Recommended Posts

Java features
[Java] About Java 12 features
About Java features
java1.8 new features
Predicted Features of Java
[Java] Three features of Java
New features from Java7 to Java8
Java learning (0)
Studying Java ―― 3
[Java] array
Java protected
[Java] Annotation
Java array
Studying Java ―― 9
Java scratch scratch
java (constructor)
[Java] ArrayDeque
java (override)
java (method)
Java Day 2018
Java string
java (array)
Java static
java beginner 4
Studying Java ―― 4
Java (set)
java shellsort
[Java] compareTo
Studying Java -5
java reflexes
Java memorandum
☾ Java / Collection
Java array
Studying Java ―― 1
[Java] Array
[Java] Polymorphism
Studying Java # 0
Java review
java framework
[Java] Inheritance
FastScanner Java
java beginner 3
Java memo
java (encapsulation)
Java inheritance
[Java] Overload
Java basics
Decompile Java
Java 9 new features and sample code
[Java] Annotation
java notes
java beginner
Java (add2)
JAVA (Map)
[java] interface
Java9 collection
Java basics
Java methods
Java diary