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:
-
- Garbled characters appear when exporting queried data as a csv file in Java
- The reason why garbled characters appear when the queried data is exported as a "csv" file in "java" is that the file exported in "csv" mode does not contain "BOM" information by default. The solution is to set the "BOM" identifier (byte stream starting with "EF", "BB", "BF") for the content to be output.
- JavaBase 2487 2019-12-04 15:46:41
-
- How to avoid reading garbled files in java
- How to avoid reading garbled files in java: check the file encoding before reading the file in java, and then use the encoding of the file when java uses the InputStreamReader() method to read the file, so that garbled characters will not appear.
- JavaBase 2680 2019-12-04 15:46:09
-
- Java download file name garbled problem
- Solution to the garbled file name of java downloaded file: 1. Use the URLEncoder.encode() method to set the encoding format of the downloaded file for IE or a browser based on IE. 2. For non-IE browsers, use the String(byte[],decode) method to specify the file encoding.
- JavaBase 2279 2019-12-04 15:23:26
-
- How to open exe file in java
- The method of opening an "exe" file in "java" is: first use the "Runtime" class to obtain an instance of the current program, then create a process variable, then use the "exec" method to execute the file, and finally try to capture the file execution process through the exception mechanism possible exceptions.
- JavaBase 2976 2019-12-04 14:49:52
-
- Java method to determine whether a time is today
- How to determine whether a time is today in java: first specify the start and end of the day's time, and then use the java.time.LocalTime.isAfter() and java.time.LocalTime.isBefore() methods to determine whether the specified time is between the days of the day. .
- JavaBase 7252 2019-12-04 14:44:45
-
- Solution to java garbled code problem
- Solution to java garbled code: 1. jsp page garbled code: add pageEncoding="UTF-8" statement to set the page encoding to solve the problem. 2. The garbled string transmitted from the background to the front end can be solved by using the setCharacterEncoding("UTF-8") statement to set the encoding during transmission.
- JavaBase 2503 2019-12-04 14:31:59
-
- How to package into jar package in java
- The method of packaging "java" into a "jar" package is: first use "javac" to compile the "java" file to get the "class" file, then create a new file, and then put the compiled "class" file and the newly created file Enter the specified folder, and finally use the "jar" command to package it.
- JavaBase 23892 2019-12-04 14:24:30
-
- How to open java binary file
- In Java, you can use FilenputStream, a subclass of InputStream, to read binary files. The FileInputStream stream is called a file byte input stream, which refers to reading file data in the form of bytes.
- JavaBase 2144 2019-12-04 14:11:05
-
- Java determines whether a character is a number
- How to determine whether a character is a number in java: 1. Use the isDigit() method to determine whether a character is a number. 2. First define the regular expression "[0-9]*", and then use the matches() method to match the regular expression to determine whether the character is a digit. 3. Use the ASCII code of the character to determine whether the character is numeric.
- JavaBase 2658 2019-12-04 13:54:22
-
- How to implement polymorphism in java
- Java polymorphism means dynamic binding of methods during specific access. Java's implementation of dynamic binding of method calls mainly relies on the method table, which can be achieved through the class reference invocation (invokevitual) and interface reference invocation (invokeinterface) methods.
- JavaBase 3677 2019-12-04 11:48:05
-
- Introduction to the method of determining whether a variable is of type int in java
- In Java, you can use the instanceof keyword to determine whether a variable is of type int. Strictly speaking, the instanceof keyword is a binary operator in Java, used to test whether an object is an instance of a class. You can determine whether a variable is of type int by judging whether it is an instance of type int.
- JavaBase 7892 2019-12-04 11:23:24
-
- How to implement java multithreading
- Methods to implement multi-threading in java: 1. By inheriting the Thread class. 2. By implementing the Runnable interface. 3. Implement multi-threading by implementing the Callable interface. 4. Use thread pool to implement multi-threading.
- JavaBase 3771 2019-12-04 11:06:59
-
- How to enter numbers in java
- How to input numbers in Java: Java's Scanner class provides methods such as nextInt (used to read integers), nexFloat (read single-precision floating-point numbers), nextDouble (read double-precision floating-point numbers), etc., which can be used like C language Scanf reads numbers of a specified type.
- JavaBase 9857 2019-12-04 10:52:44
-
- Introduction to the solution to garbled csv exported by java
- Solution to garbled CSV exported by Java: Files exported in CSV mode do not contain BOM information by default. This problem can be solved by setting the BOM identifier (byte stream starting with EF BB BF) for the content to be output.
- JavaBase 3530 2019-12-04 10:41:15
-
- What are the commonly used data types in Java?
- There are four and eight commonly used data types in Java, namely: integer types: byte, short, int, and long. Floating point type: float, double. Logical type: boolean (it has only two possible values: true false). Character type: char.
- JavaBase 3615 2019-12-04 10:32:26