包含标签:Java 的文章
-
Java factory method design pattern
Factory method pattern is the most widely used pattern in design pattern. In object-oriented programming, the creation…… -
Encapsulation of Java
In Java, the member variable is declared as private, and then public methods are provided: setxxx() and getxxx() to op…… -
Initialization block of jvaa
1. Function of initialization block: initialize Java objects; 2. Program execution sequence: declare the default value…… -
Java array
There are several ways to declare a one-dimensional array: Int a [] and int [] a Dynamic initialization: int [] a = Ne…… -
Get the type of variable in Java
Java must define a function to obtain the type of variable: Output: Java lang.Short -
Java annotation
Annotation is actually a special tag in the code. These tags can be obtained during compilation, class loading and run…… -
Can constructors in the parent class of Java be inherited by subclasses?
The subclass inherits the properties and methods of the parent class by default, but does not inherit the constructor …… -
This keyword of Java
What is this? When will it be used? This is used when the object calling the method needs to be used in the method. Fo…… -
Java inner class
In Java, the definition of one class is allowed to be located inside another class. The former is called internal clas…… -
+ + and in Java–
Difference between I + +, I -- and + + I, -- I: I + +, I -- assignment before operation; @H_ 502_ 17@++i , -- I is cal…… -
Final keyword of Java
When declaring classes, attributes and methods in Java, you can use the keyword final to modify them, indicating "fina…… -
Thread of Java (thread creation method, thread class in Java, thread synchronization, thread life cycle, communication between threads)
CPU: 10 core, main frequency 100MHz 1 core dominant frequency 3GHz So which CPU is better? Isn't the more CPU cores th…… -
JavaBean of Java
JavaBean is a reusable component written in Java language. JavaBeans refer to Java classes that meet the following sta…… -
Polymorphism of Java
Polymorphism: the most important concept in object-oriented, which is embodied in Java in two ways: Member variable ca…… -
Logical operators of Java
&-Logic and | - logic or- Logic non &&- short circuit and | - short circuit or ^ - logic XOR Points needin…… -
Program flow control of Java
Sequential structure: the code is executed from top to bottom; Branch structure: if () { } else{ } if () { } else if (…… -
Object class of Java
Object is the parent class of all classes, also known as the base class. If you do not use the extends declaration in …… -
Java (I) basic knowledge
Common DOS commands: History of computer language: Javase: Java Standard Edition, which provides a complete Java core …… -
Ternary operator of Java
Logical operation? m : n; If the logical operation is true, M is returned; otherwise, n is returned example: Judge the…… -
Subclass object instantiation process of Java
Suppose there is a parent class: There is a subclass: Student stu = new student(); The process is as follows: -
Collection, a tool class of Java operation collection
Collections is a tool class that operates on collections such as set, list, and map. Collections provides a large numb…… -
Bit operator of Java
Integer to binary: integer toBInaryString(6) < <: move left, 3 < < 2 = 3 * 2 * 2 = 12 >>: shift righ…… -
Java of Java io. File related methods
java. io. Use of file. IO principle and stream classification. File stream: FileInputStream, fileoutputstream, FileRea…… -
Variable number formal parameters of Java
//Use array parameters to define methods public static void test (int a,String[] books); //A variable number of formal…… -
Object type conversion of Java
Conversion between basic data types: public class Person extends Object{} public class Student extends Person{} Cast J…… -
Priority of Java operators
The priority decreases from top to bottom, that is, the priority of the previous line is always greater than that of t…… -
Static keyword of Java
Design idea of class attribute and class method: Scope of use: in Java classes, static can be used to modify attribute…… -
Ternary operator of Java
Logical operation? m : n; If the logical operation is true, M is returned; otherwise, n is returned example: Judge the…… -
Java = = operator and equals operator
==Operator: Equals operator: Output: false false Output: true true Output: true true true false Note: A1 and B1 point …… -
How to automatically complete new objects in eclipse
For example, we are entering: Then press Ctrl + 1, Select the first item: -
What is the HTTP protocol
Concept: Http: Hyper Text Transfer Protocol. effect: Let's think about a problem first. As shown in the figure below, …… -
Download and installation of jdk8 for novices and configuration of path environment variables
Some things are not often used and will always be forgotten, so I want to write them down so that I can find them when……