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:
-
- Java method to determine if a string is not empty
- How to determine whether a string is empty in Java: 1. Use "str!=null" to determine. Null means that the string does not point to anything. 2. Use """.equals(str)" to judge. "" means that it points to a string of length 0. 3. Use "str.length()!=0" to judge.
- JavaBase 6019 2019-12-24 17:15:21
-
- Java uses if to determine whether strings are equal
- Java uses if to determine whether strings are equal: For example, to determine whether string a and string b are equal, you can use the "if(!a.equals(b))" statement to determine. The equals() method is used to compare the string with the specified Object comparison, returns true if the given object is equal to the string; otherwise returns false.
- JavaBase 3729 2019-12-24 15:47:51
-
- Solution to java output Chinese garbled characters to html
- Solution to Java outputting Chinese garbled characters to HTML: 1. Use the response.setHeader() method to specify the HTML encoding format, and then use the getOutputStream() method to write the specified encoding format data. 2. Use the getWriter() method to write data.
- JavaBase 2780 2019-12-24 15:36:22
-
- How to solve java garbled code in eclipse
- Solution to java garbled code in eclipse: 1. Change the encoding format of the entire file type. 2. Change the encoding format of the entire Eclipse workspace. 3. Change the console encoding format. 4. Change the encoding format of a single file.
- JavaBase 3020 2019-12-24 15:17:06
-
- Introduction to several common errors in Java
- Common errors in Java: 1. Null pointer error, solution: add protection, and judge when the element is not null. 2. Copy the string multiple times. 3. There is no object returned by clone. 4. Copy wrong data.
- JavaBase 4765 2019-12-23 15:43:28
-
- How to determine whether an object is null in java
- How to determine whether an object is null in Java: To determine whether an object is null, you can use if(obj==null){} to determine. Reasons for empty objects in Java: 1. The programmer forgot to instantiate it. 2. The empty object is passed from other places.
- JavaBase 4177 2019-12-23 15:26:33
-
- Java implements obtaining the character encoding of a text file
- This article is recommended by the Java introductory learning column. It introduces how to obtain the character encoding of a text file through examples. I hope it can help you. The default encoding of String in Java is UTF-8, which can be obtained using the [Charset.defaultCharset()] statement.
- JavaBase 12419 2019-12-23 11:49:49
-
- Java method to determine whether it is empty
- How to determine whether it is empty in java: 1. Use the StringUtils.isEmpty(Object str) method to determine whether the string or object is empty. 2. Use the isEmpty() method to determine whether the array or collection is empty.
- JavaBase 2807 2019-12-21 17:07:43
-
- Java compressed file garbled problem
- Solution to the problem of garbled java compressed files: 1. The Chinese garbled content can be solved by using the open source class library in the ant.jar class to compress the file. 2. Garbled comments in compressed files can be solved by using the setEncoding method to specify the encoding of the compressed file.
- JavaBase 2500 2019-12-21 16:38:56
-
- Java email garbled solution
- Solution to garbled java email: 1. Use the encodeText() method to set the email subject encoding format to solve the garbled email title. 2. Set the encoding format of the email body in setContent().
- JavaBase 2549 2019-12-21 16:20:56
-
- Several solutions to garbled code problems in Java
- Several solutions to garbled code problems in Java: 1. Use req.setCharacterEncoding("UTF-8") to solve the garbled code in the post method. 2. Use resp.setContentType("text/html;charset=utf-8") to solve the garbled response.
- JavaBase 2879 2019-12-21 15:53:48
-
- Solution to Java download garbled code
- Solutions to garbled java downloads: 1. The IE kernel browser uses the specified encoding mechanism to convert the string format through the URLEncoder.encode() method. 2. Non-IE browsers: Use the new String(byte[],decode) method to parse the file using the specified encoding.
- JavaBase 2812 2019-12-21 15:07:54
-
- Java method to determine whether strings are not equal
- How to determine whether strings are equal in Java: 1. Use "==" to determine whether they are equal and return true, and if they are not equal, return false. 2. Use the equals() method to determine whether the strings are equal. If they are equal, it returns true; if they are not equal, it returns false.
- JavaBase 6986 2019-12-21 14:50:40
-
- Detailed explanation of java internal classes (with relevant interview questions)
- In the Java language, a class can be defined in another class or in a method. Such a class is called an inner class. Inner classes in a broad sense generally include these four types: member inner classes, local inner classes, anonymous inner classes and static inner classes.
- JavaBase 2301 2019-12-20 17:29:07
-
- Detailed explanation on how to use the final keyword in java
- This article introduces the detailed use of the final keyword from the java development introductory column, hoping to help students who are learning. Usage: 1. Modify the class; 2. Modify the member method; 3. Modify the basic variable type; 4. Modify the reference variable; 5. Modify the constant.
- JavaBase 2052 2019-12-20 11:59:42