current location:Home > Technical Articles > Java > JavaBase

  • what are exceptions in java
    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 2970 2019-12-05 16:21:56
  • How to encrypt in java
    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 4303 2019-12-05 15:34:23
  • How to read whether a file exists in java
    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 1856 2019-12-05 15:17:54
  • How to solve java Chinese garbled characters in linux environment
    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 3218 2019-12-05 15:00:04
  • How to compare characters in java without case sensitivity
    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 4394 2019-12-05 14:33:31
  • Introduction to the method of judging whether it is a number in Java
    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 3032 2019-12-05 14:21:13
  • Loading java vm error solution
    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 8225 2019-12-05 14:07:36
  • Garbled characters appear when url passes Chinese parameters in Java
    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 2265 2019-12-05 14:05:03
  • Solution to garbled file name when downloading files in Java
    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 2100 2019-12-05 13:36:58
  • Java randomly generates non-repeating numbers between 1 and 15
    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 3658 2019-12-05 13:33:05
  • How to enter an array from the keyboard in java
    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 17570 2019-12-05 13:18:05
  • How to implement file upload in java
    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 2639 2019-12-05 11:52:16
  • Solution to garbled code in java jsp page
    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 2341 2019-12-05 11:38:19
  • Solution to garbled code in java email sending
    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 3479 2019-12-05 11:20:51
  • Solution to garbled code exported by excel in java
    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 3546 2019-12-05 10:41:51

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!