1. Class methods in Java are divided into class methods (modified with static, also called static methods) and instance methods (not decorated with static, also called non-static methods)
Instance variables cannot be referenced in class methods
The definition of instance variables is similar to instance methods. There are no variables modified with static. The creation of instance variables is the same as the creation of instance methods. It is also completed when the object of the class is created. Instance variables have not yet been assigned memory addresses.
The super and this keywords cannot be used in class methods
This is because both super and this point to the objects of the parent class and this class, and when the class method is called, these objects may not have been created yet.
When a class method of this class is called from a class method, it can be called directly
Instance methods of a class can be called by creating an instance object in a class method
2. Java does not allow separate methods, procedures or functions to exist and need to belong to a certain class
3. The methods in the java language belong to the members of the object, not the members of the class, however, the static methods belong to the members of the class.
4.Integer types in java include byte short int long
5. In the vi editor of the Linux system, if you do not save the changes to the file, you should use the ___ command to force quit the vi editor.
Answer: q!
Analysis: q is to exit when there is no modification, if there is modification, it will prompt to save
:wq is to save and exit
:q! means that no matter whether there is any modification or not, it is not saved and forced to quit
6. The five words *****/usr/lacal/run.sh in the Linux crontab represent: minutes, hours, days, months, weeks
Week is 0~6
Crontab is an instruction used to set periodic execution. It is a very common technology on the Internet. Many tasks are set to be executed in crontab cycles. If they are not used, they are resident tasks.
7. When using the mkdir command to create a new directory, the option to create the parent directory first if its parent directory does not exist is -p
8. Create a new administrator user admin, the parameters that need to be used useradd -u -0 -o admin
9. To shut down the linux system (without restarting), use the command half or shutdownm -h to add time
The restart command has reboot or shutdown -r plus time
10. The FTP server has two ports, of which port 21 is used for connection and port 20 is used for data transfer
That is to say, port 20 is the port used for real transmission, and port 21 is only used for FTP login authentication. When we usually download files, we will encounter that when the download reaches 99%, the file is not completed and cannot be downloaded successfully. In fact, it is because after the file is downloaded, user authentication must be performed on port 21. If the time to download the file is too long, the connection between the client and the server on port 21 will be interrupted by the server as a timeout connection. reason. The solution is to set the response time of port 21.