My name is @yuka_pon and I am an intern at Future Electronic Technology.
When you're learning Java, you'll see a lot of classes, right? So this time, I've summarized what I learned about the classes that appear in Java.
What exactly is a ** class ** in the first place?
A class is a collection of processes for executing a program. In order to perform that process, you need to create an object.
The class can be created by displaying it as follows.
class class name{
Execution processing
}
Classes also have ** class inheritance **. This allows other classes to handle the execution processing held by the class in the same way. The inheriting class is called ** superclass ** or ** parent class **, while the inherited class is called ** subclass ** or ** child class **.
Class inheritance is expressed as follows:
class parent class name{
Execution processing
}
class child class name extends parent class name{
Execution processing
}
** Inner class ** is to create a new class within a class.
In that case, it is expressed as follows.
class class name 1{
class class name 2{
Execution processing
}
}
The ** wrapper class ** is a class used to use basic data such as int type.
There are many other classes as well. For more information, click here [https://www.sejuku.net/blog/24931).
Recommended Posts