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:
-
- The reason why the specified path cannot be found when creating a file in java
- When creating a file, it prompts that the specified path cannot be found. This is because the directory has not been created. When you create a file, you should first create the file's parent directory and then create the file.
- JavaBase 6642 2019-11-27 09:23:58
-
- Java question mark garbled solution
- Solution to Java garbled question marks: 1. Convert Chinese encoding format during output (String(str.getBytes("GB2312"), "8859_1");). 2. Convert the encoding format when reading from parameters, the method is opposite to that when outputting.
- JavaBase 3831 2019-11-27 09:15:35
-
- How to determine whether a string is a decimal in java
- The method to determine whether a string is a decimal in "java" is: first, by calling the "isBlank()" method to initially determine whether the string is empty or composed of blank characters, then define a regular expression for judgment, and finally by calling The "matches" method can determine whether a string is a decimal.
- JavaBase 4597 2019-11-26 17:42:58
-
- How to determine what a string starts with in java
- The way to determine what a string starts with in "java" is: first define a variable to save the prefix string, and then call the "startsWith" method to determine. If the string starts with the specified prefix, "true" will be returned. Otherwise, "false" is returned.
- JavaBase 11795 2019-11-26 17:14:20
-
- How to determine how many specified characters a string contains in java
- The way to determine how many specified characters a string contains in "java" is: first define a variable to save the number of occurrences of the specified character, then call the "indexOf" method to calculate the subscript of the specified character, and finally use "if" Just use the sentence to make a judgment.
- JavaBase 12402 2019-11-26 16:56:10
-
- Characters in java are garbled
- The reason why the characters in "java" are garbled is: the characters are garbled due to inconsistency between the encoding method and the decoding method. The solution is: first use the function "defaultCharset" to view the default character set used by the system, and then modify the decoding method to be the same as the encoding method.
- JavaBase 2293 2019-11-26 16:45:09
-
- Introduction to java learning process
- Java is a very popular language. Many people are learning Java now. We can easily find many Java tutorials on the Internet, but most of the tutorials we find on the Internet are scattered, which is not conducive to our Java learning. This article will introduce you to the learning process of java.
- JavaBase 3605 2019-11-26 16:35:28
-
- How to determine whether a string contains a certain character in java
- The method to determine whether a string contains a certain character in "java" is: first, you can use the "contains" method, which returns "true" only if and only if the string contains the specified sequence of character values. Secondly, you can also use "indexOf" method, but the return value of this method is "int".
- JavaBase 9575 2019-11-26 16:32:14
-
- Java collection class graphic tutorial
- Java collection classes are the basic knowledge in Java. Collections are mainly responsible for saving and holding other data. Therefore, collection classes are also called container classes. All collection classes are located under the java.util package. This article introduces us to the collection class in Java in detail, hoping to provide some help when you learn Java.
- JavaBase 1953 2019-11-26 16:16:18
-
- Detailed explanation of transient keyword in java
- Java provides a mechanism for object serialization. An object can be represented by a byte sequence that contains information such as the object's data, the object's type, and the attributes stored in the object. After the byte sequence is written to the file, it is equivalent to persisting the information of an object in the file. Conversely, the byte sequence can also be read back from the file.
- JavaBase 1745 2019-11-26 16:14:58
-
- How to implement java string formatting and add 0 if the length is insufficient
- The method to realize the filling of 0 when the length of string formatting in "java" is insufficient is: first, you can save the length of the string that needs to be formatted into a variable, and then compare it with the required length. If the length is insufficient, further use a "while" loop Judgment, use the "append" function to add 0 to the insufficient part.
- JavaBase 5468 2019-11-26 16:12:06
-
- How to avoid garbled characters in java programs
- The reason why garbled characters appear in the "java" program is that the original encoding format of the string is inconsistent with the encoding format used for parsing when reading. The way to avoid garbled characters is: first, you must know that "java" is uniformly represented by "Unicode" in the string, and then ensure that the string encoding is consistent with the encoding format used for parsing when reading.
- JavaBase 2900 2019-11-26 15:55:25
-
- The difference and implementation of 'shallow copy' and 'deep copy' in Java (with code)
- Shallow copy, also known as shallow copy. Create a new object, and then copy the non-static fields of the current object to the new object. If the field is of value type, then copy the field; if the field is of reference type, copy the reference but not the referenced object. Deep copy not only copies the object itself, but also copies all objects pointed to by the references contained in the object.
- JavaBase 1979 2019-11-26 15:53:10
-
- Java operation database - use connection pool to connect to the database
- Create a connection pool and configure connection properties. Use a connection pool to obtain a connection. Every time you need to connect to the database, you do not need to establish a connection, but obtain it through the connection pool, which provides the connection. After using the connection, you do not need to manually release the connection, but let the connection pool release the connection.
- JavaBase 3701 2019-11-26 15:43:13
-
- How to implement bubble sorting of arrays in java
- Below, the Java introductory learning column will introduce how to implement bubble sorting of arrays. I hope it can help you. Compare two adjacent elements in turn. If the former is greater than the latter, swap positions. After each sorting pass, the maximum value in this pass will be placed in the last position. Repeat the above process until there are no elements that need to be compared.
- JavaBase 1864 2019-11-26 15:22:18