I was a little lazy on the fourth day,

Leetcode's question is that there are some knowledge points and there is no perfect reserve, so it can't be done, and it can't be completed,
so that question is still a little unfinished ;

/*给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 
 * ?找出所有满足条件且不重复的三元组。
注意:答案中不可以包含重复的三元组。
示例:
给定数组 nums = [-1, 0, 1, 2, -1, -4],
满足要求的三元组集合为:
[
  [-1, 0, 1],
  [-1, -1, 2]
]
 * 
 */

Then I was just looking for knowledge points, and there was no algorithm progress.
One, I learned about the application areas of java programs:
1: Desktop applications: especially desktop applications that require cross-platform.
Let me explain the desktop applications first: Simply put, the programs whose main functions are all running on our local machine, such as word, excel and other applications running on this machine belong to desktop applications.
2: Enterprise-level applications
First explain the enterprise-level applications: Simply put, it is a large-scale application. Generally speaking, there are a large number of users and a large amount of data. It is important to the stability, security, scalability and assembly of the system There are relatively high requirements.
This is currently the most widely used area of ​​Java, almost out-of-the-box. Including various industry applications, enterprise informatization, and e-government, etc. The fields involve: office automation OA, customer relationship management CRM, human resources HR, enterprise resource planning ERP, knowledge management KM, supply chain management SCM, enterprise equipment management system EAM, product lifecycle management PLM, service-oriented architecture SOA, business intelligence BI, project management PM, marketing management, process management WorkFlow, financial management... and so on almost all the applications you can think of.
3: Embedded devices and consumer electronic products
including wireless handheld devices, smart cards, communication terminals, medical equipment, information appliances (such as digital TVs, set-top boxes, refrigerators), automotive electronics, etc. are all popular Java applications in recent years. Especially Java applications and Java games on mobile phones are even more popular.
4: Java other functions:
such as performing mathematical operations, displaying graphical interfaces, network operations, database operations, file operations, and so on.
If you really want to learn Java well, finding a reliable training organization can make your learning process more effective.

2. The relationship between Jre, jvm, jdk
1. Java runtime environment (JRE):
It includes the Java virtual machine, Java core class libraries and supporting files. JRE is the Java runtime environment. Since it is running, it must of course include jvm, not A development environment, so it does not contain any development tools (such as compilers and debuggers), but only for users who use Java programs 2. Java
Development Kit (JDK): It
is a complete Java software development kit, including jre, compile Debugger and other tools: JavaDoc, Java debugger, allows developers to develop, compile, and execute Java applications. There is a directory named jre in the JDK installation directory, which contains two folders bin and lib. Here you can think that the bin is jvm, and the lib is the class library required for jvm work, and jvm and lib Together, it is called jre
3. Java Virtual Machine (JVM):
It is the core part of the entire Java implementation of cross-platform. All Java programs will first be compiled into .class class files, which can be in the virtual machine The upper execution means that the class does not directly correspond to the machine's operating system, but indirectly interacts with the operating system through the virtual machine. The virtual machine interprets the program to the local system for execution. Only jvm cannot be executed as a class, because When interpreting the class, jvm needs to call the class library lib that is needed for interpretation, and jre contains the lib class library.
Third, public static void main(String[] args) is the main method for
beginners to learn programming language, the teacher will definitely talk about it The main method, unlike C or C++, does not need to return any value. At the same time, it has a strict syntax specification:
public static void main(String... args)
Static is static, which means that the main method is static. When the virtual machine calls this method, there is no need to create an instance containing the main method. If the main method is non-static, then the jvm needs to create an instance when calling the main method, because main The method is not unique, so it is impossible to determine which main method needs to be called, which can only lead to program errors; in addition to this, there is another reason that after the static method like main is loaded into the memory, the jvm can be called directly without creating an instance. carried out.
Another point that needs to be mentioned is that in Java, static methods correspond to tool classes, and non-static methods correspond to objects. This is also the difference between Java and C. After all, C does not require object-oriented; Python also has tools for static methods, but Python does not It is recommended to use static methods too much, but static methods of Python can be accessed by classes and instances. However, if the non-static method is used too much, compared with the static method, the amount of code is large and the operation efficiency is low. Therefore, Java is designed in this way to make the code more standardized during the development process!
I saw that some friends mentioned the singleton mode. This is also a reason. Using java to develop software, the singleton mode can ensure that a class corresponds to an object instance in the system. This design mode is relatively simple. In the design mode, the factory mode The instantiation can also be restricted. This method is also commonly used in system development, that is, when a task is queued for execution. For example, a TV advertising system can have multiple files waiting, but only one file is in the playing state.
– Just for knowledge points, if there is infringement, contact the author to delete

Guess you like

Origin blog.csdn.net/weixin_43525516/article/details/104202896