current location:Home > Technical Articles > Java > JavaBase

  • Java method to determine if a file does not exist and then create it
    Java method to determine if a file does not exist and then create it
    How to create a file in Java when it is judged that it does not exist: Use the file.exists() method to judge whether the file exists. If it does not exist, use the file.createNewFile() method to create a new empty file.
    JavaBase 8717 2019-12-14 10:07:24
  • Java method to verify whether it is a number
    Java method to verify whether it is a number
    How to verify whether it is a number in java: 1. Use the isDigit() function to verify whether it is a number. 2. Use the regular expression "^[-\+]?[\d]*$" to determine whether it is a number. 3. Determine whether the character is a number by judging the ASCII code of the character.
    JavaBase 3518 2019-12-14 09:59:39
  • How to install java
    How to install java
    Java installation method: 1. Download the JDK installation file and double-click it, and then install it according to the installation interface prompts. 2. Create and set the environment variables JAVA_HOME, CLASSPATH, and Path.
    JavaBase 17608 2019-12-14 09:49:51
  • Java filters garbled characters (\u format garbled characters, unicode garbled characters)
    Java filters garbled characters (\u format garbled characters, unicode garbled characters)
    Java method to filter garbled characters: first define a regular expression that matches special characters such as illegal unicode encodings, use matcher() to match the content to be filtered, and then use the replaceAll() method to replace garbled characters with empty characters.
    JavaBase 3317 2019-12-14 09:30:22
  • Methods to solve Chinese garbled characters in java
    Methods to solve Chinese garbled characters in java
    Methods to solve Chinese garbled characters in Java: 1. For Chinese garbled POST requests, you can use "setCharacterEncoding" to set the encoding before obtaining the parameter value. 2. GET requests can be solved by transcoding the requested bytes.
    JavaBase 4043 2019-12-14 09:13:37
  • How to write paging in java
    How to write paging in java
    Java paging implementation method: Create a Page class, which contains the number of pages currently accessed and the number of record rows displayed on each page, and then calculates the total number of pages, the current number of pages, the starting position of the table record, and the total number of records through paging calculations , each page size and other data.
    JavaBase 2870 2019-12-13 15:45:24
  • Several ways to get the current time in java
    Several ways to get the current time in java
    This article introduces several ways to obtain the current time from the java development introductory column. I hope it can help you. There are generally three ways to obtain the current time: 1. [new Data] method; 2. [system] acquisition; 3. Use date class implementation.
    JavaBase 2543 2019-12-13 11:59:31
  • Solution to garbled value transfer in java
    Solution to garbled value transfer in java
    Solution to garbled value transfer in java: 1. Use String(userCode.getBytes("ISO-8859-1"), "UTF-8") to force transcode Chinese. 2. Add an encoding filter to the configuration web.xml file to prevent garbled characters when transferring Chinese values.
    JavaBase 2037 2019-12-12 16:33:18
  • Java method to determine whether files are the same
    Java method to determine whether files are the same
    How to determine whether the files are the same in Java: 1. Calculate the MD5 or SHA-1 value of the file, and then determine whether the files are the same based on the MD5 or SHA-1 value. 2. Directly determine whether the files are the same based on whether the file length and content are the same.
    JavaBase 2682 2019-12-12 16:26:33
  • Java implements counting the number of different characters or numbers in a string
    Java implements counting the number of different characters or numbers in a string
    This article from the Java Language Introduction column demonstrates how to count the number of different characters or numbers in a string. I hope it can help you. The code shown in this article can be implemented to count the number of characters of each category in a string containing letters, numbers, punctuation marks or special symbols.
    JavaBase 3599 2019-12-12 12:00:18
  • Solution to garbled code when using jar package in java
    Solution to garbled code when using jar package in java
    Solution to garbled characters when using jar packages in java: 1. Set the encoding format of java files and Eclipse console to UTF-8 to solve the problem. 2. Just add encoding when quoting the jar package, such as "java -Dfile.encoding=utf-8 -jar demo.jar".
    JavaBase 5287 2019-12-12 10:13:21
  • what is java web development
    what is java web development
    Java Web is the sum of technologies that use Java technology to solve related web and Internet fields. The web consists of two parts: web server and web client. Java has many applications on the server side, such as Servlet, JSP and third-party frameworks, etc.
    JavaBase 4999 2019-12-12 10:05:43
  • Solution to garbled Chinese output in java console
    Solution to garbled Chinese output in java console
    Solution to the garbled Chinese output of the Java console: Just specify the encoding of the console as utf8. eclipse console: Modify in "Console Encoding" of the "Common" tab. cmd console: Use the "chcp 65001" command to change the encoding method.
    JavaBase 9500 2019-12-11 15:32:48
  • Several ways to determine whether it is an integer in java
    Several ways to determine whether it is an integer in java
    How to determine whether it is an integer in Java: 1. Use the isDigit function to determine whether the characters in the string are digits one by one to determine whether they are integers. 2. Use the regular expression "^[-\\+]?[\\d]*$" to determine whether it is an integer. 3. Determine whether it is an integer through the digital ASCII code.
    JavaBase 36311 2019-12-11 15:15:36
  • Introduction to several garbled code processing methods in Java
    Introduction to several garbled code processing methods in Java
    Java garbled solution: 1. The backend receives the request parameters, decodes them according to ISO-8859-1, gets the binary stream, and then encodes it with UTF-8. 2. Modify the server (tomcat) configuration. 3. Set the request parameter encoding directly in the servlet.
    JavaBase 4020 2019-12-10 15:34:16

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!