current location:Home > Technical Articles > Java > JavaBase
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to determine whether file exists in java
- The method to determine whether "file" exists in "java" is: you can use the "file.exists" method in the "File" class to check. First, you need to import the "File" class, and then save the "file" path that needs to be determined to a In the object, just call the "exists" method at the end to make a judgment.
- JavaBase 3458 2019-11-27 10:01:25
-
- Introduction to the method of determining whether a file exists in java (with code)
- In Java, you can use the file.exists() method of the File class to detect whether a file exists. exists() tests whether the file or directory represented by the abstract path name exists. If and only if the file or directory represented by the abstract path name exists, it returns true, otherwise it returns false.
- JavaBase 3447 2019-11-27 09:57:35
-
- How to make double type data retain two decimal places in java
- The way to keep two decimal places for "double" type data in "java" is: first, you can define an object to save the defined rounding mode, and then use the defined object to call the "format" method to combine the data that needs to be modified with the definition. The rounding mode can be matched.
- JavaBase 15665 2019-11-27 09:46:13
-
- Java method to determine whether it is a date (code attached)
- How to determine whether it is a date in Java: 1. First define a regular expression to determine the date, and then use the matches() method to match the regular expression to determine whether it is a date. 2. Use the SimpleDateFormat class to set the date format, and then determine whether it is a date by throwing an exception.
- JavaBase 6024 2019-11-27 09:46:01
-
- Garbled characters appear when converting byte[] to String in java
- The reason why "byte[]" in "java" is garbled when converted to "String" is due to different encoding standards. The solution is: you can use the common "Base64" encoding specification. The "Base64" encoding specification can convert common characters into 6-bit binary representation, so that standard conversion can be guaranteed.
- JavaBase 10567 2019-11-27 09:28:00
-
- 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 7108 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 4087 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 4835 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 12070 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 12696 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 2649 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 3857 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 9862 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 2463 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 2180 2019-11-26 16:14:58