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:
-
- How many bytes does the int type occupy in java?
- The int type in java occupies 4 bytes. Byte is a unit of measurement used by computer information technology to measure storage capacity. It is a string of binary digits processed as a unit and is a small unit that constitutes information. The most commonly used byte is an octet, that is, it contains an eight-bit binary number.
- JavaBase 16779 2019-12-04 16:43:17
-
- Several ways to implement multithreading in java
- The way to implement multi-threading in "java" is: 1. Inherit the "Thread" class, create a class to inherit the "Thread" class, then rewrite the "run" method, and call the instance object of this class in the "main" method The "start" method is enough; 2. Implement the "Runnable" interface.
- JavaBase 5050 2019-12-04 16:43:08
-
- What does instance mean in java?
- An instance refers to an object implementation based on a certain class. This process is called instantiation. Instance generation method: 1. Use the new keyword to generate. 2. Use the newInstance method of the Class class. 3. Use the newInstance method of the Constructor class.
- JavaBase 6656 2019-12-04 16:31:47
-
- How to get the first non-repeating character in a string in java
- The method of "java" to obtain the first non-repeating character in a string is: first obtain the string data input by the user through the "Scanner" class, and then obtain the index and number of the last time a certain character appeared in the string. The index that appears in the string once can be determined by using the "if" statement.
- JavaBase 2906 2019-12-04 16:26:46
-
- java error: main class not found or unable to load solution
- Java error: The main class cannot be found or cannot be loaded. Solution: Use "java package name + class name" to solve the problem. This error occurs because the java command by default searches in the directory specified in the CLASSPATH environment variable when searching for the address of the class file.
- JavaBase 10517 2019-12-04 16:07:43
-
- 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 2643 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 2861 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 2423 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 3161 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 7422 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 2646 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 24051 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 2432 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 2807 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 3943 2019-12-04 11:48:05