current location:Home > Technical Articles > Java > JavaBase

  • java determines whether it is ip
    java determines whether it is ip
    How to determine the IP address in Java: 1. Create a new static class IpAdd and create a static method isIP; 2. First determine the length of the string in the method, and continue to determine if it is between 7-15; 3. Use regular expressions to determine whether the 4 addresses are A number in the range 0-255 is the IP.
    JavaBase 3043 2019-11-18 16:21:43
  • Java determines whether it is in json format
    Java determines whether it is in json format
    Methods for java to determine whether it is json format: 1. Create an isJsonObject function; 2. Use the toString method to convert the parameters into a string; 3. Use JSONObject.parseObject in the try statement block to parse the string; 4. If there is no exception in catch, it is json Format.
    JavaBase 3048 2019-11-18 16:00:33
  • How to test a specified method in java
    How to test a specified method in java
    The way to test a specified method in Java is: first import the Junit jar package in the test class, then call the method under the specified class to prepare for testing, then call a method under the class that needs to be tested, and finally use junit to run the test. .
    JavaBase 3502 2019-11-18 15:53:44
  • Java determines whether it is a Chinese character
    Java determines whether it is a Chinese character
    How to determine whether it is a Chinese character in Java: first create a function isChinese and receive a char type parameter c; then use "String.valueOf(c).matches("[\u4e00-\u9fa5]")" to determine the range of characters. If it is true, it is a Chinese character.
    JavaBase 4952 2019-11-18 15:36:40
  • What does the this keyword in java mean?
    What does the this keyword in java mean?
    The this keyword in Java represents an object of its own, representing the object itself, which can be understood as a pointer to the object itself. The role of this keyword: access member variables, member methods, etc.
    JavaBase 10221 2019-11-18 15:03:40
  • java get week
    java get week
    How to get the week in java: First create a getWeek function that receives a Date type parameter; then use the setTime method of the GregorianCalendar instance to set the time within the function; and finally use the get method of the instance to get the week number.
    JavaBase 3611 2019-11-18 14:59:32
  • When to use this keyword in java
    When to use this keyword in java
    The this keyword is used in Java at the following times: 1. When local variables and member variables have the same name; 2. When passing the current object to other methods; 3. When a reference to the current object needs to be returned; 4. During construction When calling the constructor in the constructor.
    JavaBase 2226 2019-11-18 14:47:06
  • Will java variables be inherited?
    Will java variables be inherited?
    Variables in Java will be inherited, provided that the member variable type of the parent class is public or protected. When the member variables of the parent class are private, they cannot be inherited, but they can be accessed through the corresponding methods provided by the parent class.
    JavaBase 3560 2019-11-18 14:34:31
  • The difference between HashMap and LinkedHashMap in java
    The difference between HashMap and LinkedHashMap in java
    The difference between HashMap and LinkedHashMap in Java is: HashMap is the most commonly used Map, which stores data according to the HashCode value of the key; LinkedHashMap is a subclass of HashMap, which saves the insertion order of records.
    JavaBase 5338 2019-11-18 14:19:34
  • java -jar cannot find main class
    java -jar cannot find main class
    The solution to the problem that java -jar cannot be found: first use WinRAR software to open the jar file; then edit the MANIFEST.MF file and add Main-Class as the class name of the program entry file; finally save and update the compressed package.
    JavaBase 3195 2019-11-18 14:14:57
  • What are the common methods of list collection in Java?
    What are the common methods of list collection in Java?
    Commonly used methods for list collections in Java are: 1. "add(int index, E element)", insert an element at the specified position, and all subsequent elements will be moved back one element; 2. "get(int index)", return the list The element at the specified index in the collection.
    JavaBase 5170 2019-11-18 14:00:13
  • What should I do if gbk's unmappable characters appear in Java?
    What should I do if gbk's unmappable characters appear in Java?
    The solution to the unmappable character of gbk in Java: first use notepad++ software to open the source file; then copy all the code to the clipboard; then delete all the code and set the file encoding format to ANSI; finally paste the code and save it.
    JavaBase 6323 2019-11-18 13:51:22
  • The difference between long and Long in java
    The difference between long and Long in java
    The difference between long and Long in Java is: 1. Long is the basic data type in Java, and Long is the object type in Java; 2. For Long type data, the data is an object, and for long type data, the Data is a basic data type and does not belong to objects.
    JavaBase 6008 2019-11-18 13:39:58
  • What does java if(x) mean?
    What does java if(x) mean?
    The meaning of java if(x) is that when the value of variable x is not empty, not 0, not false, not null, the following content will be executed.
    JavaBase 5537 2019-11-18 13:38:40
  • Java determines whether list contains a certain value
    Java determines whether list contains a certain value
    Java method to determine whether a list contains a certain value: You can use the "contains(Object o)" method, which is used to determine whether the list contains a specified element. If the list contains the specified element, it returns true, otherwise it returns false. .
    JavaBase 11202 2019-11-18 13:26:32

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