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:
-
- what are exceptions in java
- An Exception in Java, also known as an exception, is an event that occurs during program execution and interrupts the normal instruction flow of the executing program. In order to handle running errors in the program promptly and effectively, exception classes must be used.
- JavaBase 3050 2019-12-05 16:21:56
-
- How to encrypt in java
- Java encryption method: 1. Encrypt using MD5 (Message Digest Algorithm) encryption algorithm. 2. Use BASE64 for encryption/decryption. 3. Use DES (Data Encryption Standard) symmetric encryption. 4. Use RSA asymmetric encryption.
- JavaBase 4393 2019-12-05 15:34:23
-
- How to read whether a file exists in java
- In Java, you can use the file.exists() method of the File class to detect whether a file exists. If and only if the file or directory represented by the abstract path name exists, it returns true; otherwise, it returns false.
- JavaBase 1935 2019-12-05 15:17:54
-
- How to solve java Chinese garbled characters in linux environment
- Solution to Java Chinese garbled characters in Linux environment: Manually set the Chinese fonts required by the Java program. Upload the required font files to the $JAVA_HOME/jre/lib/fonts directory and restart tomcat.
- JavaBase 3312 2019-12-05 15:00:04
-
- How to compare characters in java without case sensitivity
- Java's case-insensitive way to compare characters: Use equalsIgnoreCase() in Java to compare a string with a specified object, regardless of case. Returns true if the given object is equal to the string; false otherwise.
- JavaBase 4470 2019-12-05 14:33:31
-
- Introduction to the method of judging whether it is a number in Java
- How to determine whether it is a number in Java: 1. Use the isDigit() method to determine whether it is a number. 2. Use the regular expression "^[-\+]?[\d]*$" to determine whether it is a number. 3. Determine whether it is a number through the ASCII code.
- JavaBase 3091 2019-12-05 14:21:13
-
- Loading java vm error solution
- Solution to loading java vm error: 1. Do not use the JAVA_HOME variable in the JAVA installation tutorial. 2. Use absolute paths when establishing PATH and CLASSPATH. Do not use %JAVA_HOME%.
- JavaBase 8319 2019-12-05 14:07:36
-
- Garbled characters appear when url passes Chinese parameters in Java
- The reason why the Chinese parameter in "java" is garbled is that the server uses "ISO" encoding by default to decode the byte stream into a character stream. The solution is: the obtained string needs to be encoded into a byte stream using "ISO" first, and then decoded into a character stream using "utf-8".
- JavaBase 2349 2019-12-05 14:05:03
-
- Solution to garbled file name when downloading files in Java
- Solution to garbled file names when downloading files in Java: 1. Use the URLEncoder.encode() method to specify the file name encoding for IE or browsers based on IE. 2. Non-IE browsers use the String.getBytes(String decode) method to solve garbled characters.
- JavaBase 2174 2019-12-05 13:36:58
-
- Java randomly generates non-repeating numbers between 1 and 15
- The method of "java" to randomly generate non-repeating numbers between 1 and 15 is: you can use the "random" method, first create a linked list of "Integer" collection, and then use the "random" function and loop to realize that when 15 exists in the linked list When the number is reached, it ends inserting data into the linked list, and finally iterates and outputs the elements in the linked list.
- JavaBase 3723 2019-12-05 13:33:05
-
- How to enter an array from the keyboard in java
- The method of inputting an array from the keyboard in "java" is: you can use the "Scanner" class, first create a "Scanner" object, then define an array to save the input data, and separate the elements through ",", and finally pass " parseInt" function converts the input string into the "Int" type.
- JavaBase 17653 2019-12-05 13:18:05
-
- How to implement file upload in java
- The method to implement file upload in "java" is: first configure the upload parameters, then parse the content of the request, extract the file data, then iterate the form data, process the fields that are not in the form, then define the storage path and full path of the uploaded file, and finally Just save the file to your hard drive.
- JavaBase 2706 2019-12-05 11:52:16
-
- Solution to garbled code in java jsp page
- Java jsp page garbled solution: The jsp page is garbled because the jsp page does not specify the encoding. As long as the encoding format is specified at the top of the jsp page (use pageEncoding="utf-8"), the jsp page garbled code can be solved.
- JavaBase 2410 2019-12-05 11:38:19
-
- Solution to garbled code in java email sending
- Solution to garbled email sent by java: 1. Specify the encoding in setContent() or setHeader() when sending the text. 2. Specify the encoding of the email header in setSubject().
- JavaBase 3558 2019-12-05 11:20:51
-
- Solution to garbled code exported by excel in java
- Solution to the garbled code exported by excel in Java: Use the new String(byte[],decode) method to use the specified encoding decode to parse the byte[] (Excel) into a string, and there will be no garbled code.
- JavaBase 3616 2019-12-05 10:41:51