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 is not recognized as an internal or external command solution
- When the javac command prompt "not an internal or external command" is entered in cmd, it may be because the java environment variable is configured incorrectly. The solution is to use the set java_home, set classpath, and set path commands in cmd to configure the correct environment variables.
- JavaBase 10070 2019-12-16 11:09:33
-
- Several ways to deal with garbled characters in java
- Java's method of dealing with garbled characters: 1. When receiving parameters, decode according to ISO-8859-1 to obtain a binary stream, and then encode it with UTF-8. 2. Modify the server (tomcat) configuration and add UTF-8. 3. Set the request encoding when requesting in post mode.
- JavaBase 3138 2019-12-16 10:44:47
-
- Solution to garbled code displayed in java
- Solution to Java displaying garbled codes: The browser calls jsp, html and other pages to display garbled Chinese characters. Solution: Save the file in UTF-8 format, and then set it to use UTF-8 for parsing in the browser.
- JavaBase 2978 2019-12-16 10:08:14
-
- How to determine whether a string contains a certain character in java
- How to determine whether a string contains a certain character in Java: 1. Use the contains method to determine whether the string contains a certain character. If the string contains a character, it returns true, otherwise it returns false. 2. Use the indexOf method to determine. This method returns the position of the specified character in the string.
- JavaBase 7399 2019-12-14 16:17:25
-
- Introduction to the method of determining whether the specified file exists in java
- How to determine whether a file exists in java: first use the exists() method to determine whether the file or directory represented by the specified path name exists, and then use the isDirectory() method to determine whether the test object is a folder.
- JavaBase 3467 2019-12-14 16:08:54
-
- How to add an error page in java
- How to add an error page in java: first enable the error prompt in web.xml and connect to the error prompt page error.jsp. Then customize the error message page content.
- JavaBase 1747 2019-12-14 15:37:43
-
- Solution to Java reading Chinese garbled characters
- Solution to Java reading Chinese garbled characters: Use the InputStreamReader class to specify the encoding method of the data stream when reading Chinese in Java. The InputStreamReader class is a bridge that associates bytes to characters. It is responsible for processing the conversion of read bytes into characters during the I/O process.
- JavaBase 2465 2019-12-14 15:27:46
-
- Solution to Chinese garbled data written by java to mysql
- The reason why mysql data is garbled is that the character sets of Java and the database are inconsistent. Usually, you only need to set the character set specified when creating the database table to be consistent with the character set specified by the URL when setting the database connection in Java to solve the problem.
- JavaBase 2322 2019-12-14 15:05:04
-
- Solution to Chinese garbled code in java writing xml
- Solution to garbled Chinese characters written in XML in Java: Change the header encoding of the XML file to utf-8, and change the StreamResult encoding method to utf-8. The StreamResult class acts as the holder of the conversion result, which can be XML, plain text, HTML, or some other formatted markup.
- JavaBase 2742 2019-12-14 14:55:49
-
- How to express not equal in java
- Inequality in Java can be expressed by "!=" between numbers, and strings can be compared using the "!equals" method. The equals() method is used to compare a string with a specified object. If the given object is equal to the string, it returns true; if it is not equal, it returns false.
- JavaBase 27432 2019-12-14 14:39:38
-
- Reasons and solutions for java compilation errors that cannot find symbols
- The reason why the java compilation error cannot find the symbol: the Java naming conflicts with the class name in the JDK, causing the compilation error. Solution: Change the name of the java file to solve the problem.
- JavaBase 6150 2019-12-14 14:27:20
-
- Solution to garbled file name in java export file
- Solution to garbled file names in Java export files: Add a code to the getBytes() method of the export statement String((edTemplate.getTemplateName()+"Import Template").getBytes(),"ISO-8859-1") Can.
- JavaBase 3837 2019-12-14 14:06:51
-
- Java uses lambda expression to sort a certain attribute of List object collection
- This article is introduced by the java introductory learning column: how to use lambda expressions to sort a certain attribute of a List object collection. I hope it can help you. There are usually two methods for sorting, namely: 1. Sorting according to a certain field in positive order; 2. Sorting according to a certain field in reverse order.
- JavaBase 7748 2019-12-14 12:00:03
-
- How to determine whether a string is garbled in java
- Java method to determine whether the code is garbled: You can use the "java.nio.charset.Charset.forName("GBK").newEncoder().canEncode("test")" statement to determine whether the code is garbled.
- JavaBase 4120 2019-12-14 11:07:04
-
- Java method to determine whether it is of type int
- In Java, you can use the instanceof keyword to test whether the data to be judged is an instance of the int type to determine whether it is an int type. If it is an int type the instanceof operator returns true.
- JavaBase 7776 2019-12-14 10:20:39