current location:Home > Technical Articles > Java > JavaBase
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- What is the factory pattern in java
- The factory pattern in Java is an instantiation object pattern that uses factory methods instead of new operations. In the factory pattern, the creation logic is not exposed to the client when creating an object, and a common interface is used to point to the newly created object.
- JavaBase 4553 2019-11-11 15:07:53
-
- Java determines whether a character is a letter
- How to determine whether a character is a letter in java: first create a function check and receive a string parameter; then take the first character of the string in the function and determine whether it is in the a-z or A-Z range; finally, based on the judgment result being true, it is concluded that the character is Just letters.
- JavaBase 10548 2019-11-11 15:02:18
-
- Java determines whether a character is empty
- How to judge whether a character is empty in java: 1. Use "if(s==null || s.equals(""))" to judge, which is less efficient; 2. Use "if(s == null || s .length() == 0)" for judgment, which is more efficient and so on.
- JavaBase 4584 2019-11-11 14:45:36
-
- what is java singleton pattern
- The singleton pattern in java is a common design pattern that ensures that instances of a class are singletons. The singleton mode can save memory resources. No matter how frequently instances are created through exposed methods, the created object can be guaranteed to be the same instance object in the system memory.
- JavaBase 2729 2019-11-11 14:37:15
-
- Java gets the first few characters of a string
- How to get the first few characters of a string in java: use the substring function to intercept the specified string. The first parameter is the starting index, and the second parameter is the ending index; use substring("string",3) to intercept The first three digits of the string.
- JavaBase 15146 2019-11-11 14:31:10
-
- what is reflection in java
- Reflection in Java means that in the running state, any class can know what methods and properties the class has, and any object can call its methods and properties.
- JavaBase 4236 2019-11-12 09:36:04
-
- How to initialize an array in java
- Methods for initializing arrays in java: 1. Static initialization, use arrayName = new type[]{element1,element2...} for initialization; 2. Dynamic initialization, use arrayName = new type[length] for initialization.
- JavaBase 6230 2019-11-11 14:13:09
-
- What do keywords mean in java
- Keywords in Java are words that are given specific meanings in the Java language. Keywords cannot be used as identifiers. Among them, the two special keywords goto and const in Java are called reserved words.
- JavaBase 13134 2019-11-12 09:36:50
-
- How to implement java multithreading
- How to implement multi-threading in Java: 1. Use the extends keyword to inherit the Thread class and override the run method to implement multi-threading; 2. Use the implements keyword to implement the Runnable interface and override the run method to implement multi-threading; 3. Through Callable implements multi-threading.
- JavaBase 3592 2019-11-11 13:55:32
-
- What does exception in java mean?
- An exception in Java refers to an event that occurs during program execution. Exceptions interrupt the normal instruction flow of the executing program, and exception classes must be used to effectively handle running errors in the program.
- JavaBase 7174 2019-11-12 09:37:30
-
- Generate unique random numbers java
- How to generate non-repeating random numbers in java: first use the Math.random method to generate a random number; then use the contains method of ArrayList to determine whether it is repeated, and add it to the collection if it is not repeated; finally, assign the value of the collection to the array.
- JavaBase 2940 2019-11-11 13:40:47
-
- How to understand abstract classes in java
- The abstract class in Java refers to: the class modified by the abstract keyword is an abstract class. Abstract classes cannot be instantiated, and abstract classes can have object references pointing to subclass objects.
- JavaBase 2868 2019-11-12 09:38:17
-
- What is a collection in java
- A collection in Java is a container for data, to be precise, a container for data object references. Collections store references to objects, not the objects themselves. So we call the objects in the collection the references to the objects in the collection.
- JavaBase 4017 2019-11-11 13:22:02
-
- How to enter in java
- Input method in java: First import the java.util.Scanner package at the beginning of the program; then use new Scanner to create a Scanner object; finally use the nextLine, nextInt, and nextDouble methods to obtain the input data.
- JavaBase 18617 2019-11-11 13:19:35
-
- what is java multithreading
- A Java thread is an execution path or a control unit within a process; Java multi-threading refers to the existence of multiple threads in a process, and multi-threading can improve program execution efficiency.
- JavaBase 4473 2019-11-11 11:57:20