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:
-
- How to determine whether an object is empty in java
- Methods to determine whether an object is empty in java: 1. Use the StringUtils.isEmpty(CharSequence cs); method to determine. This method can only determine the String type. 2. Use StringUtils.isEmpty(Object str); method to judge.
- JavaBase 3780 2019-11-21 16:11:10
-
- What are the methods to determine whether a string is empty in java
- The methods to determine whether a string is empty in Java are: 1. Use the "equals()" method, for example: "if(s == null ||"".equals(s))"; 2. Compare the length of the string, For example: "if(s == null || s.length() <= 0)".
- JavaBase 3070 2019-11-21 15:58:49
-
- How to determine the day of the week in java?
- How to determine the day of the week in java: You can use the DAY_OF_WEEK method provided in Calendar to get the day of the week. The date of the week obtained by DAY_OF_WEEK starts with Sunday.
- JavaBase 3416 2019-11-21 15:45:33
-
- How to determine whether a character is a Chinese character in java
- The method to determine whether a character is a Chinese character in Java is: first use the "valueOf()" method to return the object value of the character, then define a regular expression for judgment, for example: "[\u4e00-\u9fa5]", and finally use Just match using the "matches()" method.
- JavaBase 6609 2019-11-21 15:42:10
-
- How to determine whether the specified key exists in the map collection object in java
- Java's method of determining whether a specified key exists in a map collection object: first define a map object, then add objects to the collection through the "put()" method, then define a specified key value, and finally pass "map.containsKey()" Just use the method to judge.
- JavaBase 3850 2019-11-21 15:19:48
-
- Java determines whether it is Chinese
- How to determine whether it is Chinese in java: 1. Use the regular expression "[\u4e00-\u9fa5]" to determine whether it is Chinese. 2. Determine whether the character is Chinese by judging whether the Unicode encoding of the character is between 19968 and 40869.
- JavaBase 3419 2019-11-21 15:15:47
-
- How to determine whether data is ip in java
- The method to determine whether the data is IP in Java is: first determine whether the length of the data matches the IP length, then define a regular expression, use the "compile" method to compile the regular expression and create a matching pattern, and then use the "matcher()" method according to Just match the pattern.
- JavaBase 2683 2019-11-21 15:03:34
-
- Java determines whether a string is a date
- How to determine whether a string is a date in Java: first specify the date format, and then use the DateFormat class or SimpleDateFormat class to determine whether it is the correct date format and whether it is a date.
- JavaBase 2974 2019-11-21 14:53:08
-
- How to determine whether a string is in json format in java
- The method to determine whether a string is in json format in Java is: first format the string that needs to be processed, and then use the methods "startsWith()" and "endsWith()" to determine whether the first and last letters of the string are "{}" or "[]", if neither, it is not in json format.
- JavaBase 16319 2019-11-21 14:44:38
-
- What collections are there in java
- There are three main types of collections in Java: set, list and map. List: stores ordered and repeatable elements, set: stores unordered and non-repeatable elements, map: stores elements in key-value form.
- JavaBase 4192 2019-11-21 14:35:33
-
- How to determine whether a file is in xml format in java
- The method to determine whether a file is in XML format in Java is: first create a parser object through "DocumentBuilderFactory", then use the "parse()" method to parse the file, for example: "parse(file)", and finally make an exception based on the returned information Just judge.
- JavaBase 3890 2019-11-21 14:26:42
-
- How to delete files in java
- In Java, you can use the file.delete(); method to delete files. When the delete() method is called, the file is deleted directly, regardless of whether the file exists, and it is executed immediately once called.
- JavaBase 15118 2019-11-21 14:19:58
-
- How to determine whether a string is a url in java
- The method to determine whether a string is a URL in Java is: first use the string to set a regular expression, then compile the regular expression and create a matching pattern through the "Pattern.compile" method, and finally use the "matches()" method according to the matching pattern Just match the string.
- JavaBase 5775 2019-11-21 14:05:52
-
- How to read files in java
- Methods for reading files in java: 1. Read by using the [java.io] method, relative to the relative path of the current user directory; 2. Read by using the [java.lang.ClassLoader] method, relative to the classpath The relative path to read.
- JavaBase 61223 2022-01-12 15:30:15
-
- How to determine whether a number is prime (prime number) in java
- The method to determine whether a number is a prime number (prime number) in Java is: first determine whether the number is an even number, if so, return directly, and then start from the next number with a step size of 2 until the arithmetic square root of n. If it cannot be divided, it is a prime number.
- JavaBase 11391 2019-11-21 13:42:12