sample
public class HelloWorld{
public static void main(String[] args) {
System.out.println("hello");
}
}
As a magic for programming beginners Although it is customary (?) To create a HelloWorld class at the beginning of learning It's easy to think that the Hello World class is the only class I created. Actually, it is a program consisting of a total of 348 classes that move in cooperation with other 347 classes.
Except for one class that I created, 347 classes are standard attachments to Java from the beginning. They are called ** API ** (Application Programming Interface).
The API comes standard with over 200 packages and over 3500 classes, and you can use it freely at any time. The API was created by developers around the world and is fast and bug-free.
Typical packages are as shown in the table below
package name | Description |
---|---|
java.lang | An important group of classes that are indispensable for Java |
java.util | Various classes that make programming convenient |
java.math | Classes related to mathematics |
java.net | Classes for network communication, etc. |
java.io | Classes for successive processing of data such as reading and writing files |
In particular, many of the classes that belong to the ** java.lang package are used frequently **. It is designed to be ** automatically imported ** without any special import. System in System.out.println () is a java.lang.System class.
Recommended Posts