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:
-
- Java determines whether array elements are repeated
- How to determine whether array elements are repeated in Java: 1. First deduplicate the array, and then use the array length to determine whether the array elements are repeated. 2. Compare the elements in the array sequentially through a double loop to determine whether the elements are repeated.
- JavaBase 8493 2019-11-22 13:17:27
-
- How to determine whether it is a folder in java
- Use isDirectory() in java to check whether an object is a folder, and the return value is of type boolean. Returns true if so, false otherwise.
- JavaBase 2886 2019-11-22 11:47:00
-
- How to determine whether two objects are equal in java
- The equals() method is used in Java to determine whether two objects are equal. The equals() method compares the memory addresses of the two objects to determine whether the two objects are equal.
- JavaBase 6188 2019-11-22 11:00:31
-
- Determine whether it is an array in java
- Methods to determine whether it is an array in Java: 1. Use the instanceof keyword to determine whether it is an array. 2. Use the getClass() method to obtain the object type and determine whether it is an array through the object type.
- JavaBase 5954 2019-11-22 10:47:40
-
- Determine whether it is a letter in java
- In java, you can use a loop to traverse a string. In the loop, use chars[i]>='a'&&chars[i]<='z')||(chars[i]>='A'&&chars[i]<= The 'Z' statement determines whether each character in the string is a letter.
- JavaBase 3670 2019-11-22 10:31:12
-
- what is java method
- A Java method is a collection of statements, an ordered combination of steps to solve a type of problem, which together perform a function. Methods are contained in a class or object, are created in the program, and are referenced elsewhere.
- JavaBase 2138 2019-11-22 10:19:26
-
- Introduction to the method of determining whether it is a triangle in java
- Write a method void triangle(int a, int b, int c) to determine whether the three parameters can form a triangle based on the length of the three sides. If not, an IllegalArgumentException is thrown.
- JavaBase 5387 2019-11-22 09:49:32
-
- Java determines whether a string is double type
- In java, you can define a regular expression "[0-9]+[.]{0,1}[0-9]*[dD]{0,1}" to determine whether it is a double type, and then use matches( ) method checks whether a string matches a given regular expression to determine whether it is a double.
- JavaBase 8823 2019-11-22 09:40:44
-
- How to determine whether a string is Chinese in java
- Methods to determine whether a string is Chinese in Java: 1. Use the regular expression "[\u4e00-\u9fa5]" to determine whether a string is Chinese. 2. Determine whether the character Unicode encoding in the string is Chinese by looping through it between 19968 and 40869.
- JavaBase 3900 2019-11-22 09:28:17
-
- How to determine whether a string is a letter in java
- In Java, you can use the str.matches("[a-zA-Z]+") method to match whether a string is a letter. The matches() method is used to detect whether a string matches a given regular expression.
- JavaBase 8751 2019-11-22 09:17:48
-
- 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 2327 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 12792 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 17359 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 6748 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 3162 2019-11-21 16:14:02