current location:Home > Technical Articles > Java > JavaBase

  • java array one-dimensional array
    java array one-dimensional array
    This article is recommended by the Java introductory learning column and introduces some relevant knowledge about one-dimensional arrays in detail. Java performs out-of-bounds checks on array elements to ensure safety. If the array element subscript is less than 0, greater than or equal to the array length, an exception will be generated.
    JavaBase 2037 2019-11-28 14:36:04
  • Determine whether a folder exists in java, create it if it does not exist
    Determine whether a folder exists in java, create it if it does not exist
    In "java", the method to determine whether a folder exists or create it if it does not exist is: first save the folder path that needs to be determined into an object, and then call the "exists" and "isDirectory" methods to determine whether it is a folder and whether it exists. , if it is not a folder or does not exist, call the "mkdir" method to create the folder.
    JavaBase 2693 2019-11-28 11:50:39
  • Garbled characters appear when reading text files in java
    Garbled characters appear when reading text files in java
    The reason for garbled characters when reading text files in "java" is: "java" uses the default character set in the local environment when reading the data stream. The solution is: when "java" reads the data stream, it must specify the encoding method of the data stream, for example: "UTF-8".
    JavaBase 1823 2019-11-28 11:18:59
  • Detailed graphic and text explanation of garbled file reading problem in Java
    Detailed graphic and text explanation of garbled file reading problem in Java
    When Java reads a file, if you do not specify the encoding format, it will use the default character set in the local environment. When the text encoding format is different from the local one, garbled characters will appear. We can specify the encoding format when reading the file to avoid garbled characters.
    JavaBase 2111 2019-12-07 15:15:53
  • How to solve the problem of garbled characters when uploading web projects in Java
    How to solve the problem of garbled characters when uploading web projects in Java
    The way to solve the problem of garbled characters when uploading "web" projects in "java" is: it can be solved by "Filter". First define a class to implement "Filter" and declare a "doFilter" method in the class, and then in this method Just set the requested character set and release the request to the destination address.
    JavaBase 2846 2019-11-28 11:00:46
  • Solution to garbled code when java inserts data into mysql
    Solution to garbled code when java inserts data into mysql
    The solution to the garbled code when java inserts data into mysql: Just add the encoding format when connecting to the mysql database in java. When connecting to the database, add "?characterEncoding=UTF-8" after the database name to add the encoding format.
    JavaBase 2161 2019-12-07 15:14:43
  • Implementation in java to determine whether a file exists and create it if it does not exist
    Implementation in java to determine whether a file exists and create it if it does not exist
    The way to determine whether a file exists in "java" and create it if it does not exist is: first define an object to save the file path that needs to be determined, then call the "exists" method combined with the "if" loop to make a preliminary determination, and then use exceptions If the implementation file does not exist, just create it.
    JavaBase 3251 2019-11-28 10:47:47
  • Two ways to get the day of the week of a date in java
    Two ways to get the day of the week of a date in java
    How to get the day of the week of a date in Java: 1. Use the Calendar class to get the day of the week. Note that the week obtained by this method starts on Sunday. 2. Use the SimpleDateFormat class to get the day of the week, and use the parameter "EEEE" to get it.
    JavaBase 5987 2019-12-07 15:13:53
  • Detailed explanation of the method to determine whether it is a leap year in Java
    Detailed explanation of the method to determine whether it is a leap year in Java
    How to determine whether it is a leap year in Java: Use the if statement in Java code to determine whether it is a leap year by determining whether the year is divisible by 4, not divisible by 100, or divisible by 400.
    JavaBase 11722 2019-12-07 15:12:38
  • Detailed explanation of the causes and solutions of garbled characters in Java
    Detailed explanation of the causes and solutions of garbled characters in Java
    The reason for garbled characters: It is caused by the inconsistency between the original encoding format of the string and the encoding format used for parsing when reading. Solution: Just change the encoding format of the garbled text in the java code.
    JavaBase 12610 2019-12-07 15:08:13
  • How to determine whether a string is an int in java
    How to determine whether a string is an int in java
    The method of judging whether a string is "int" in "java" is: first judge the length of the string that needs to be judged. If the length of the string is not 0, then use the "charAt" method to judge whether the specified index character in the string is "int", finally use loop judgment.
    JavaBase 5393 2019-11-28 09:59:12
  • java error: symbol not found
    java error: symbol not found
    The "symbol not found" error reported in Java is generally because the corresponding class is not introduced in the code. This article takes the Arrays method as an example to introduce the reasons and solutions for the error "symbol not found" when the Arrays class is not introduced.
    JavaBase 29937 2019-11-28 09:57:06
  • Java error: Reasons and solutions for main class not found or unable to be loaded
    Java error: Reasons and solutions for main class not found or unable to be loaded
    Reason for the error: This problem often occurs because the java source file contains the package name. Solution: 1. Delete the package name from the source file (not recommended). 2. Create a file path structure under code that is the same as the package name.
    JavaBase 63983 2019-11-28 09:45:01
  • How to determine whether a string consists of characters in java
    How to determine whether a string consists of characters in java
    The method to determine whether a string is composed of characters in "java" is: first define a regular expression for determination, for example: "^[a-zA-Z]*", and then by calling the "matches" method, you will need Just match the determined string with the defined regular expression.
    JavaBase 2445 2019-11-28 09:44:41
  • Java custom error page implementation method
    Java custom error page implementation method
    How to specify an error page in java: customize the error page and call the customized page in web.xml. When the service throws a 404 or 500 exception, the servlet service will look in web.xml to find out whether error-page and error-code are set to call a custom error page.
    JavaBase 2621 2019-11-28 09:35: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!