End of Java knowledge points

Record the knowledge points of this java exam, mainly focusing on your own error-prone points.
Just explain, don't explain in depth.

  1. The difference between short circuit and && and bitwise and &: when a&&b is used as the judgment condition, if the previous condition a is false, the latter condition b will not be judged. When a&b is used as the judgment condition, no matter whether the previous condition is true or not, the latter condition b will be judged.

  2. Three elements of the software process: methods, tools and processes. 1
    Software engineering methods provide "how to" techniques for software development. It includes a variety of tasks, such as project planning and estimation, software system requirements analysis, data structure, overall system structure design, algorithm process design, coding, testing, and maintenance.
    Software tools provide an automatic or semi-automatic software support environment for software engineering methods. At present, many software tools have been introduced. These software tools are integrated to establish a software development support system called Computer Aided Software Engineering (CASE). CASE combines various software tools, development machines and an engineering database storing development process information to form a software engineering environment.
    The process of software engineering is to integrate the methods and tools of software engineering to achieve the purpose of developing computer software in a reasonable and timely manner. The process defines the order in which the methods are used, the documentation required to be delivered, the management required to ensure quality and coordinate changes, and the milestones completed in each phase of software development.

  3. '>>' means shift to the right. If the number is positive, the high digit will be filled with 0; if it is negative, the high digit will be filled with 1.
    '>>>' means unsigned right shift, also called logical right shift, that is, if the number is positive, the high bit is filled with 0; and if the number is negative, the high bit is also filled with 0 after right shift.
    '<<' means shift to the left, and 0 is added to the low bit. There is no'<<<' operator.

  4. The value of switch expression (expression) can be char, byte, short, int, Character, Byte, Short, Integer, String, enum; it cannot be double, boolean, long. In this exam system, it is considered that String is not supported, and both enum and String are supported by converting to int type.

  5. In operator precedence, &> ^> |> &&> ||. By the way, bitwise XOR '^': 1 ^ 1 = 0; 1 ^ 0 = 1; 0 ^ 1 = 1; 0 ^ 0 = 0, the same is true for boolean type.

  6. The two most important sentences of polymorphism: polymorphic member variables: compile and run to the left; polymorphic member methods: compile to the left, and run to the right.

  7. Writer and Reader are abstract classes that deal with character streams. InputStream and OutputStream are abstract classes for byte stream processing. Use their subclasses when using them (abstract classes cannot be instantiated).

  8. Ternary operator a?b:c — If a is true, it outputs b, and if it is false, it outputs c. One of b or c is double type, then double type is output, such as: 3<4? 9: 9.9 and finally 9.0 is output.

  9. Top-down, gradual refinement, modularization, and restricted use of goto statements. 2
    a. Top-down: When designing a program, you should first consider the overall and then the details; first consider the overall goal, and then consider the local goal. Don't pursue too many details at the beginning, start designing from the top general goal, and gradually make the problem concrete.
    b. Gradually refinement: For complex issues, some sub-goals should be designed as transitions and gradually refined.
    c. Modularity: A complex problem must be composed of a number of simpler problems. Modularization is to decompose the overall goal to be solved by the program into sub-goals, and then further decompose it into specific small goals, and each small goal is called a module.
    d. Restrict the use of goto statements

  10. The Java language stipulates that an identifier is composed of letters (including language characters such as Chinese characters in the Unicode range), underscore (_), dollar sign ($) and numbers, and the first character cannot be a number.

  11. StringBuffer expansion problem. The initial sizes of the three constructors are: StringBuffer() size is 16, StringBuffer(int size) size is the value of parameter size, StringBuffer(String s) size is the length of s plus 16. Each expansion is 2*x+2 (x is the existing capacity).

  12. The main class and interface must be decorated by public.

  13. All classes that implement ActionListener must override the actionPerformed() method.

  14. Relational algebra: basic operations-selection, projection, union, difference, Cartesian product, renaming. Expansion operations (transformed from basic operations)-intersection, natural connection, division, assignment.

  15. Throwable is the superclass of all Exception and Error classes.


  1. Transfer from nickname: yanyichao address: www.cnblogs.com/yanyichao/p/3914443.html ↩︎

  2. Transfer from nickname: xxaichishizi Address: https://blog.csdn.net/xxaichishizi/article/details/53965315 ↩︎

Guess you like

Origin blog.csdn.net/weixin_44223946/article/details/111699123