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 the socket is connected
- In java, you can use the sendUrgentData method in the socket class to determine whether the socket is connected. If the SO_OOBINLINE attribute of the socket is not turned on, an exception will be thrown in java.
- JavaBase 4071 2020-01-14 13:21:38
-
- What to do if java files are written with garbled characters
- Java method to avoid writing garbled files into files: Use the OutputStreamWriter() method to write files. In OutputStreamWriter, you can complete reading and writing gbk files by specifying the encoding method.
- JavaBase 2583 2020-01-13 16:35:08
-
- Solution to java parameter garbled problem
- Solution to the problem of garbled java parameters: 1. Use the request.setCharacterEncoding() method to specify the encoding used when obtaining parameters in the post method. 2. Manually specify the parameter encoding when submitting data using the get method.
- JavaBase 1990 2020-01-13 16:11:01
-
- How to determine whether a string is empty or null in java
- The method to determine whether a string is empty or null in Java is: 1. Use the [if(str.length() == 0)] or [if(str.equals(" "))] method to determine whether the string is empty. ;2. Use the [if(str == null)] method to determine whether the string is null.
- JavaBase 5127 2020-01-15 10:24:42
-
- How to determine whether Chinese characters are garbled in Java
- How to determine whether Chinese garbled characters are garbled in Java: We can use the regular expression "\\s*|t*|r*|n*" to match the garbled characters in the string, and then determine whether it is by judging the length of the string that meets the matching rules. There are garbled characters.
- JavaBase 3559 2020-01-09 10:34:42
-
- How to generate java project into jar file
- How to generate a java project into a jar file in java: 1. The eclipse tool generates a jar file, select your project, right-click to export, and export the project as a jar file. 2. Convert java files to jar files through the jar command.
- JavaBase 4403 2020-01-09 09:48:31
-
- What is the principle of polymorphism in java
- The principle of polymorphism in Java is: the invocation of object methods in Java is implemented by relying on the method table in the class information. When a method of an object is called, the JVM searches the method table of the object class to determine the direct reference address of the method. , the method is actually called only after having the address.
- JavaBase 4682 2020-01-02 10:12:20
-
- How to determine whether strings are equal in java
- How to determine whether strings are equal in Java: 1. Use [==] to determine, but you need to pay attention to the situations of [String a = "abc"] and [String a = new String("abc")]; 2. Use [equals] method to judge.
- JavaBase 2680 2020-01-02 09:35:58
-
- How to determine whether a string exists in a list collection in java
- The way to determine whether a string exists in a list collection in Java is: you can use the contains method, which returns true if it exists, otherwise it returns false, for example [boolean bool = list.contains("12")].
- JavaBase 12204 2019-12-31 16:59:52
-
- How to package java program into jar file
- The method to package a java program into a jar file is: 1. First select the project, right-click, and select [export]; 2. Then select [jar file] and select the project to be packaged; 3. Then select the path to save the jar file package , click [finish] to complete packaging.
- JavaBase 4324 2019-12-31 16:51:27
-
- The difference between references in java and pointers in c++
- The difference between references in Java and pointers in C++ is: 1. References have no entity when declared and do not occupy space, while pointers are assigned values only after they are used, and memory is not allocated when not used; 2. References The initial value is the java keyword null, and the pointer is int.
- JavaBase 2412 2019-12-31 16:38:26
-
- Why can't java be installed? How to solve?
- The reason is: the "JDK" environment does not correspond to the operating system or the installation directory is wrong. The solution is: first make sure that the downloaded "JDK" environment corresponds to your own operating system, and then when installing the "JDK" environment, make sure that the installation path of "JRE" is not under the file path of "JDK".
- JavaBase 4969 2019-12-31 11:11:34
-
- Can java delete list elements?
- Java can delete list elements. Methods: 1. Use the remove() method of Iterator; 2. Use the remove() method of List, paying attention to the position of list.size(); 3. Use CopyOnWriteArrayList.
- JavaBase 2196 2019-12-31 10:54:12
-
- How to get the first few digits of a string in java
- How to get the first digits of a string in java: 1. Use the subString() method to intercept the string. subString provides different interception methods through different parameters, such as using substring(0,4) to intercept the first 4 digits. 2. Intercept through the methods provided by StringUtils.
- JavaBase 30116 2019-12-31 10:46:59
-
- What types of streams are there in java?
- Types of streams in Java: According to the direction of the stream: input stream and output stream. According to the implementation functions, there are: node flow and processing flow. According to the unit of data processing, there are: byte stream and character stream.
- JavaBase 3463 2019-12-30 17:41:11