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 solve java servlet garbled characters
- Solution to java servlet garbled code: 1. Use the setCharacterEncoding method to encode the received content. 2. Use the setContextType method to encode the content to be output and forwarded.
- JavaBase 2505 2019-11-21 17:04:18
-
- How to determine whether an element is in an array in java
- Methods to determine whether an element exists in an array in Java: 1. Convert the array into a List, and then use the contains in the List to determine whether the element exists. 2. Use set to determine whether the element exists. 3. Use a loop to traverse the array to determine whether the element exists.
- JavaBase 13011 2019-11-21 16:52:35
-
- What are the methods of assigning values to arrays in java?
- The methods of assigning values to arrays in Java are: 1. Use the direct assignment method, for example: "arr[0]=1"; 2. Use loop traversal to assign values to the array, for example: "for (int num:arr)".
- JavaBase 17537 2019-11-21 16:42:50
-
- Determine whether it is a leap year in java
- In Java, you can use the year%4==0&&year%100!=0 and year%400==0 statements to determine whether it is a leap year. As long as the specified year meets these two conditions, it is a leap year.
- JavaBase 6890 2019-11-21 16:30:36
-
- How objects are initialized in Java
- The object initialization process in Java: First, the static method of the class will be accessed to complete the initialization of the class, then the jvm will load the compiled file, generate a class object, then allocate sufficient storage space for the object, and finally complete the initialization of the method, the object The initialization is successful.
- JavaBase 3334 2019-11-21 16:14:02
-
- 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 3950 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 3240 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 3712 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 6821 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 3986 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 3585 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 2866 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 3205 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 16581 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 4346 2019-11-21 14:35:33