current location:Home > Technical Articles > Java > JavaBase

  • Garbled characters appear when exporting queried data as a csv file in Java
    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 2400 2019-12-04 15:46:41
  • How to avoid reading garbled files in java
    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 2607 2019-12-04 15:46:09
  • Java download file name garbled problem
    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 2216 2019-12-04 15:23:26
  • How to open exe file in java
    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 2915 2019-12-04 14:49:52
  • Java method to determine whether a time is today
    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 7150 2019-12-04 14:44:45
  • Solution to java garbled code problem
    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 2433 2019-12-04 14:31:59
  • How to package into jar package in java
    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 23808 2019-12-04 14:24:30
  • How to open java binary file
    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 2071 2019-12-04 14:11:05
  • Java determines whether a character is a number
    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 2596 2019-12-04 13:54:22
  • How to implement polymorphism in java
    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 3598 2019-12-04 11:48:05
  • Introduction to the method of determining whether a variable is of type int in java
    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 7811 2019-12-04 11:23:24
  • How to implement java multithreading
    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 3699 2019-12-04 11:06:59
  • How to enter numbers in java
    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 9786 2019-12-04 10:52:44
  • Introduction to the solution to garbled csv exported by java
    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 3407 2019-12-04 10:41:15
  • What are the commonly used data types in Java?
    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 3545 2019-12-04 10:32:26

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!