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 it is ip
- How to determine the IP address in Java: 1. Create a new static class IpAdd and create a static method isIP; 2. First determine the length of the string in the method, and continue to determine if it is between 7-15; 3. Use regular expressions to determine whether the 4 addresses are A number in the range 0-255 is the IP.
- JavaBase 3061 2019-11-18 16:21:43
-
- Java determines whether it is in json format
- Methods for java to determine whether it is json format: 1. Create an isJsonObject function; 2. Use the toString method to convert the parameters into a string; 3. Use JSONObject.parseObject in the try statement block to parse the string; 4. If there is no exception in catch, it is json Format.
- JavaBase 3064 2019-11-18 16:00:33
-
- How to test a specified method in java
- The way to test a specified method in Java is: first import the Junit jar package in the test class, then call the method under the specified class to prepare for testing, then call a method under the class that needs to be tested, and finally use junit to run the test. .
- JavaBase 3521 2019-11-18 15:53:44
-
- Java determines whether it is a Chinese character
- How to determine whether it is a Chinese character in Java: first create a function isChinese and receive a char type parameter c; then use "String.valueOf(c).matches("[\u4e00-\u9fa5]")" to determine the range of characters. If it is true, it is a Chinese character.
- JavaBase 4972 2019-11-18 15:36:40
-
- What does the this keyword in java mean?
- The this keyword in Java represents an object of its own, representing the object itself, which can be understood as a pointer to the object itself. The role of this keyword: access member variables, member methods, etc.
- JavaBase 10247 2019-11-18 15:03:40
-
- java get week
- How to get the week in java: First create a getWeek function that receives a Date type parameter; then use the setTime method of the GregorianCalendar instance to set the time within the function; and finally use the get method of the instance to get the week number.
- JavaBase 3629 2019-11-18 14:59:32
-
- When to use this keyword in java
- The this keyword is used in Java at the following times: 1. When local variables and member variables have the same name; 2. When passing the current object to other methods; 3. When a reference to the current object needs to be returned; 4. During construction When calling the constructor in the constructor.
- JavaBase 2250 2019-11-18 14:47:06
-
- Will java variables be inherited?
- Variables in Java will be inherited, provided that the member variable type of the parent class is public or protected. When the member variables of the parent class are private, they cannot be inherited, but they can be accessed through the corresponding methods provided by the parent class.
- JavaBase 3578 2019-11-18 14:34:31
-
- The difference between HashMap and LinkedHashMap in java
- The difference between HashMap and LinkedHashMap in Java is: HashMap is the most commonly used Map, which stores data according to the HashCode value of the key; LinkedHashMap is a subclass of HashMap, which saves the insertion order of records.
- JavaBase 5382 2019-11-18 14:19:34
-
- java -jar cannot find main class
- The solution to the problem that java -jar cannot be found: first use WinRAR software to open the jar file; then edit the MANIFEST.MF file and add Main-Class as the class name of the program entry file; finally save and update the compressed package.
- JavaBase 3222 2019-11-18 14:14:57
-
- What are the common methods of list collection in Java?
- Commonly used methods for list collections in Java are: 1. "add(int index, E element)", insert an element at the specified position, and all subsequent elements will be moved back one element; 2. "get(int index)", return the list The element at the specified index in the collection.
- JavaBase 5189 2019-11-18 14:00:13
-
- What should I do if gbk's unmappable characters appear in Java?
- The solution to the unmappable character of gbk in Java: first use notepad++ software to open the source file; then copy all the code to the clipboard; then delete all the code and set the file encoding format to ANSI; finally paste the code and save it.
- JavaBase 6340 2019-11-18 13:51:22
-
- The difference between long and Long in java
- The difference between long and Long in Java is: 1. Long is the basic data type in Java, and Long is the object type in Java; 2. For Long type data, the data is an object, and for long type data, the Data is a basic data type and does not belong to objects.
- JavaBase 6033 2019-11-18 13:39:58
-
- What does java if(x) mean?
- The meaning of java if(x) is that when the value of variable x is not empty, not 0, not false, not null, the following content will be executed.
- JavaBase 5555 2019-11-18 13:38:40
-
- Java determines whether list contains a certain value
- Java method to determine whether a list contains a certain value: You can use the "contains(Object o)" method, which is used to determine whether the list contains a specified element. If the list contains the specified element, it returns true, otherwise it returns false. .
- JavaBase 11221 2019-11-18 13:26:32