current location:Home > Technical Articles > Java > JavaBase

  • Java determines whether a collection object is empty
    Java determines whether a collection object is empty
    The method for Java to determine whether a collection object is empty is: first use the "ArrayList" implementation class to initialize the list object, then call the "isEmpty" method to determine whether the list object is empty, then execute the clear method to remove elements, and finally execute the "isEmpty" method to reset Just judge the object.
    JavaBase 3886 2019-11-21 09:38:07
  • Java command is not an internal command nor an external command solution
    Java command is not an internal command nor an external command solution
    The Java command is neither an internal command nor an external command because we did not configure the environment variables or the environment variables were configured incorrectly. We need to create and configure the JAVA_HOME and CLASSPATH variables in the environment variable settings, and then configure the PATH variable.
    JavaBase 4880 2019-11-21 09:27:17
  • How to determine whether objects are equal in java
    How to determine whether objects are equal in java
    How to determine whether objects are equal in Java: You can use the equals method. When the class does not override the equals method, compare the addresses of the two objects to see if they are equal; when the class overrides the equals method, compare whether the contents of the two objects are the same, for example: "p1.equals (p2)".
    JavaBase 3829 2019-11-21 09:23:12
  • Java determines whether it is a letter
    Java determines whether it is a letter
    Java can use the regular expression "[a-zA-Z]+" to determine whether it is a letter. This expression can match all letters in the string. If it is a letter, it returns true, otherwise it returns false.
    JavaBase 3197 2019-11-21 09:15:02
  • The difference between internal interface and external interface in java
    The difference between internal interface and external interface in java
    The difference between internal interfaces and external interfaces in Java is that the external interface is the interface provided to the outside world (the interface provided to third parties), while the internal interface is the interface provided to the own system (the interface for internal calls within the system).
    JavaBase 5950 2019-11-20 17:29:21
  • How to debug a program in java
    How to debug a program in java
    The method of debugging a program in Java is: first set a breakpoint where you need to debug, and start debugging. If it is a web program, you need to start the server in Debug mode, and then run the program to debug. The program can be modified according to the debugging information.
    JavaBase 6708 2019-11-20 17:15:33
  • Solution to garbled Chinese SQL statements in Java
    Solution to garbled Chinese SQL statements in Java
    Garbled characters when inserting SQL statements in Java can be solved by adding the encoding format UTF-8 in DriverManage. Garbled characters can generally be solved by modifying the encoding format.
    JavaBase 3244 2019-11-20 17:05:45
  • How to jump out or terminate if statement in java
    How to jump out or terminate if statement in java
    The method to jump out or terminate the if statement in Java is: first, you can use break to jump out of the current loop, but if it is a nested loop, you can only jump out of the current loop. You can also use continue to terminate the current loop, but not jump out of the loop.
    JavaBase 19618 2019-11-20 17:04:04
  • Java writes files that are garbled
    Java writes files that are garbled
    The solution to garbled code when writing files in Java: first create a writeFile method; then specify the encoding format within the method; and finally write the file through OutputStreamWriter.
    JavaBase 2981 2019-11-20 17:03:04
  • How to initialize objects in java
    How to initialize objects in java
    The process of object initialization in Java is: first, the class is loaded and the static members of the class are initialized, and then the object of the class is created and the ordinary members of the class are initialized.
    JavaBase 4449 2019-11-20 16:33:55
  • How to determine whether a table exists in java?
    How to determine whether a table exists in java?
    Methods to determine whether a table exists in java: 1. Use JdbcTemplate query to determine whether the table exists. 2. Use the Connection object to connect the table to determine whether the table exists.
    JavaBase 4021 2019-11-20 16:27:40
  • Java determines whether it is a folder
    Java determines whether it is a folder
    In java, you can use isDirectory() to determine whether it is a folder. isDirectory() checks whether an object is a folder. The return value is of type boolean. Returns true if so, false otherwise.
    JavaBase 3082 2019-11-20 16:00:25
  • Java determines whether strings are equal
    Java determines whether strings are equal
    How to determine whether strings are equal in Java: First, you can use "==" to compare references, for example: "a==b", and then you can also use the equals method to compare values, for example: "a.equals(b)", the values ​​are equal then returns true.
    JavaBase 2276 2019-11-20 15:58:03
  • How to enter a character in java
    How to enter a character in java
    How to input characters in java: first create a Scanner object, then call the "next()" method of the Scanner object to get the string input by the console, and finally call the "charAt(0)" method of String to get the first character.
    JavaBase 8536 2019-11-20 15:46:46
  • Solution to Java reading txt garbled characters
    Solution to Java reading txt garbled characters
    Solution to Java reading txt garbled code: 1. Unify the encoding of java projects and txt files to utf-8. 2. Use the InputStreamReader(new FileInputStream(fileUrl), "utf-8") method to set the txt text encoding to utf-8 .
    JavaBase 3391 2019-11-20 15:43:58

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