current location:Home > Technical Articles > Java > JavaBase

  • Java determines whether a string contains a certain character (string)
    Java determines whether a string contains a certain character (string)
    How to determine whether a string contains a certain string in Java: 1. Use the startsWith() method to determine. 2. Use the contains method to determine. 3. Use the indexOf method to judge.
    JavaBase 3908 2019-11-21 10:32:53
  • Java determines whether it is a number
    Java determines whether it is a number
    How to determine whether it is a number in java: 1. Use the isDigit() function to determine. 2. Use the regular expression "[0-9]*" to judge. 3. Use digital ASCII code value to judge. 4. Judgment by catching NumberFormatException exception.
    JavaBase 3937 2019-11-21 10:17:51
  • Java determines whether it is a decimal
    Java determines whether it is a decimal
    How to determine whether it is a decimal in Java: first convert a string of numbers into a string, and then use contains(".") to check whether there is a decimal point "." in the string to determine whether it is a decimal.
    JavaBase 2774 2019-11-21 10:05:04
  • Java uses regular expressions to determine whether the incoming data is a number
    Java uses regular expressions to determine whether the incoming data is a number
    Java uses regular expressions to determine whether the incoming data is a number: you can use the regular expression "-?[0-9]+(\\.[0-9]+)?" to determine, but if the incoming data is If there are many digits, you need to use the "BigDecimal" method for conversion at the same time.
    JavaBase 3956 2019-11-21 09:50:27
  • How to get data from keyboard in java
    How to get data from keyboard in java
    Methods to obtain data from the keyboard in Java: You can use the Scanner class to obtain keyboard data in Java. The code for obtaining keyboard data in Java is Scanner s=new Scanner(System.in);. System.in represents the keyboard device.
    JavaBase 4366 2019-11-21 09:48:25
  • 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 4115 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 5052 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 4074 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 3330 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 6202 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 6860 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 3433 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 19979 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 3149 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 4618 2019-11-20 16:33:55

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