current location:Home > Technical Articles > Java > JavaBase

  • How to determine whether an object is empty in java
    How to determine whether an object is empty in java
    Methods to determine whether an object is empty in java: 1. Use the StringUtils.isEmpty(CharSequence cs); method to determine. This method can only determine the String type. 2. Use StringUtils.isEmpty(Object str); method to judge.
    JavaBase 3780 2019-11-21 16:11:10
  • What are the methods to determine whether a string is empty in java
    What are the methods to determine whether a string is empty in java
    The methods to determine whether a string is empty in Java are: 1. Use the "equals()" method, for example: "if(s == null ||"".equals(s))"; 2. Compare the length of the string, For example: "if(s == null || s.length() <= 0)".
    JavaBase 3070 2019-11-21 15:58:49
  • How to determine the day of the week in java?
    How to determine the day of the week in java?
    How to determine the day of the week in java: You can use the DAY_OF_WEEK method provided in Calendar to get the day of the week. The date of the week obtained by DAY_OF_WEEK starts with Sunday.
    JavaBase 3416 2019-11-21 15:45:33
  • How to determine whether a character is a Chinese character in java
    How to determine whether a character is a Chinese character in java
    The method to determine whether a character is a Chinese character in Java is: first use the "valueOf()" method to return the object value of the character, then define a regular expression for judgment, for example: "[\u4e00-\u9fa5]", and finally use Just match using the "matches()" method.
    JavaBase 6609 2019-11-21 15:42:10
  • How to determine whether the specified key exists in the map collection object in java
    How to determine whether the specified key exists in the map collection object in java
    Java's method of determining whether a specified key exists in a map collection object: first define a map object, then add objects to the collection through the "put()" method, then define a specified key value, and finally pass "map.containsKey()" Just use the method to judge.
    JavaBase 3850 2019-11-21 15:19:48
  • Java determines whether it is Chinese
    Java determines whether it is Chinese
    How to determine whether it is Chinese in java: 1. Use the regular expression "[\u4e00-\u9fa5]" to determine whether it is Chinese. 2. Determine whether the character is Chinese by judging whether the Unicode encoding of the character is between 19968 and 40869.
    JavaBase 3419 2019-11-21 15:15:47
  • How to determine whether data is ip in java
    How to determine whether data is ip in java
    The method to determine whether the data is IP in Java is: first determine whether the length of the data matches the IP length, then define a regular expression, use the "compile" method to compile the regular expression and create a matching pattern, and then use the "matcher()" method according to Just match the pattern.
    JavaBase 2683 2019-11-21 15:03:34
  • Java determines whether a string is a date
    Java determines whether a string is a date
    How to determine whether a string is a date in Java: first specify the date format, and then use the DateFormat class or SimpleDateFormat class to determine whether it is the correct date format and whether it is a date.
    JavaBase 2974 2019-11-21 14:53:08
  • How to determine whether a string is in json format in java
    How to determine whether a string is in json format in java
    The method to determine whether a string is in json format in Java is: first format the string that needs to be processed, and then use the methods "startsWith()" and "endsWith()" to determine whether the first and last letters of the string are "{}" or "[]", if neither, it is not in json format.
    JavaBase 16319 2019-11-21 14:44:38
  • What collections are there in java
    What collections are there in java
    There are three main types of collections in Java: set, list and map. List: stores ordered and repeatable elements, set: stores unordered and non-repeatable elements, map: stores elements in key-value form.
    JavaBase 4192 2019-11-21 14:35:33
  • How to determine whether a file is in xml format in java
    How to determine whether a file is in xml format in java
    The method to determine whether a file is in XML format in Java is: first create a parser object through "DocumentBuilderFactory", then use the "parse()" method to parse the file, for example: "parse(file)", and finally make an exception based on the returned information Just judge.
    JavaBase 3890 2019-11-21 14:26:42
  • How to delete files in java
    How to delete files in java
    In Java, you can use the file.delete(); method to delete files. When the delete() method is called, the file is deleted directly, regardless of whether the file exists, and it is executed immediately once called.
    JavaBase 15118 2019-11-21 14:19:58
  • How to determine whether a string is a url in java
    How to determine whether a string is a url in java
    The method to determine whether a string is a URL in Java is: first use the string to set a regular expression, then compile the regular expression and create a matching pattern through the "Pattern.compile" method, and finally use the "matches()" method according to the matching pattern Just match the string.
    JavaBase 5775 2019-11-21 14:05:52
  • How to read files in java
    How to read files in java
    Methods for reading files in java: 1. Read by using the [java.io] method, relative to the relative path of the current user directory; 2. Read by using the [java.lang.ClassLoader] method, relative to the classpath The relative path to read.
    JavaBase 61223 2022-01-12 15:30:15
  • How to determine whether a number is prime (prime number) in java
    How to determine whether a number is prime (prime number) in java
    The method to determine whether a number is a prime number (prime number) in Java is: first determine whether the number is an even number, if so, return directly, and then start from the next number with a step size of 2 until the arithmetic square root of n. If it cannot be divided, it is a prime number.
    JavaBase 11391 2019-11-21 13:42:12

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