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:
-
- Summary of methods to determine whether an object is empty in Java
- There are three ways to determine whether an object is empty in "java", namely: 1. Traverse the object according to "for...in", if it exists, return "true", otherwise return "false"; 2. Use "ES6" Use "Object.keys()" to judge; 3. Use JSON's own method to judge.
- JavaBase 5936 2019-11-29 11:57:58
-
- How to prevent duplicate elements in list collection in java
- The method in "java" to make the elements in the "list" collection non-repeating is: first define a "list" object, then add several repeated elements through the "add" method, then instantiate an "ArrayList" object, and finally judge by traversing Just assign it to another "list" collection.
- JavaBase 6396 2019-11-29 11:30:21
-
- Java page garbled solution
- Solutions to garbled java pages: 1. The garbled page submitted to tomcat can be solved by configuring the encoding format in tomcat/conf/server.xml. 2. If the JSP page is garbled, just use the "String(byte[],decode)" method at the beginning of the page to specify the encoding format.
- JavaBase 2451 2019-12-10 17:10:36
-
- How to write an interface and implement it in java
- The way to define an interface and implement it in "java" is: the definition format is "interface interface name [extends other interface names] {variable declaration abstract method}". The interface implementation needs to use the "implements" keyword, and generally all of it needs to be implemented. method, otherwise it needs to be marked as an abstract class.
- JavaBase 5705 2019-11-29 11:14:59
-
- Introduction to solutions to garbled characters in the Java console
- Solution to garbled characters in java console: 1. Eclipse console: Select "Run Configuration" - "Common" - "Console Encoding" - "UTF-8" in the menu. 2. cmd: execute the chcp 65001 command.
- JavaBase 2526 2019-12-10 17:10:01
-
- Garbled characters appear when java decompresses zip package
- The solution to garbled characters when decompressing "java" "zip" packages is: first determine whether the file to be decompressed exists or whether the path is correct, then determine whether the path exists, if not, create the path, then determine whether the compressed file is legal, and finally set The file name can be encoded as "GBK".
- JavaBase 2842 2019-11-29 10:57:29
-
- Java error not found symbol solution (referencing custom class)
- Solution to the error "symbol not found" when java references a custom class: 1. Compile the referenced class first, and then add the name of the folder where the file is located in the command to compile the java file. 2. Add the javac -classpath (cp) parameter when compiling the java file.
- JavaBase 12762 2019-12-10 17:09:23
-
- Reasons and solutions for garbled characters exported from java to excel
- Reason for garbled code: httpheader requires that the exported content must be encoded in iso8859-1. Solution: When exporting Excel from Java, convert the content encoding to "iso8859-1" encoding, and use the String(byte[],decode) method to transcode.
- JavaBase 7335 2019-12-10 17:07:56
-
- Introduction to the method of determining whether a variable is a number in java
- How to determine whether a variable is a number in Java: 1. Use the regular expression "[0-9]*" to determine. 2. Use the isDigit() function to determine. 3. Use org.apache.commons.lang to judge. 4. Determine whether the variable is a number by judging the ASCII code value.
- JavaBase 7094 2019-12-10 17:06:15
-
- Introduction to solutions to garbled java file downloads
- Solution to garbled java file download: 1. Use the encode() method in IE or a browser with IE as the core to transcode the file name to solve the problem. 2. Convert the file name to a string in non-IE browsers, and then transcode the string to solve the problem.
- JavaBase 2775 2019-11-29 10:11:40
-
- How to determine whether a string is a date in java
- How to determine whether a string is a date in java: first customize the date format, and then use the DateFormat class or SimpleDateFormat class to determine whether it is the correct date format to determine whether it is a date.
- JavaBase 2586 2019-11-29 09:44:35
-
- How to get the day of the week for a specified date in java
- The way to get the day of the week for a specified date in "java" is: first define an array to save the day of the week information, then instantiate a calendar class object, then get the day of the week correctly by calling "Calendar.DAY_OF_WEEK", and finally use "if" The statement can be further judged.
- JavaBase 6456 2019-11-29 09:32:28
-
- Reasons and solutions for reading Chinese garbled characters in Java files
- The reason why Java reads Chinese garbled files is because the encoding format is not set when reading the file, and the local encoding format is used by default. Solution: Specify the encoding format of the data stream when reading the data stream in Java to solve the problem of garbled characters.
- JavaBase 4911 2019-11-29 09:30:30
-
- Java determines whether a file directory exists (code attached)
- In Java, you can use the exists() method to determine whether the file or directory represented by the abstract path name exists, and then use the isDirectory() method to check whether the object is a folder. If it is a folder, it returns true, otherwise it returns false.
- JavaBase 2449 2019-11-29 09:17:20
-
- Detailed explanation of events in java with pictures and texts
- The Java language uses an authorized event model to process events. Under this model, each component has corresponding events, such as a click event for a button, a content change event for a text field, etc. This article explains events in java in detail.
- JavaBase 2551 2019-11-28 17:35:00