current location:Home > Technical Articles > Java > JavaBase

  • How to determine whether an array is empty in java?
    How to determine whether an array is empty in java?
    How to determine whether an array is empty in Java: directly use the if statement to determine whether the array is empty through "array==null", or use "array.length==0" to determine whether the array length is 0 to determine whether the array is empty.
    JavaBase 9178 2019-11-19 14:21:08
  • How to retain decimals in java
    How to retain decimals in java
    Methods for retaining decimals in java: 1. Use the API class BigDecimal provided in the java.math package to retain decimals. 2. Use DecimalFormat, a subclass of NumberFormat. 3. Use String.format. 4. Use NumberFormat.
    JavaBase 4597 2019-11-19 14:00:44
  • How to use eclipse to generate java documentation
    How to use eclipse to generate java documentation
    How to use eclipse to generate java documents: first go to the "generate javadoc" option under "project", then set the "javadoc" generation program, select the java project and document output directory to generate documents, and finally set the document encoding.
    JavaBase 4620 2019-11-19 13:55:39
  • How to input in java?
    How to input in java?
    Input methods in java: 1. Use the System.in.read() method to obtain input. 2. Use the BufferedReader class and the InputStreamReader class to obtain input. 3. Use the Scanner class to obtain input.
    JavaBase 8801 2019-11-19 13:44:45
  • What are the methods to improve the performance of java programs?
    What are the methods to improve the performance of java programs?
    Methods to improve the performance of Java programs include: 1. Try to specify the final modifier of the class; 2. Try to reuse objects; 3. Try to use local variables; 4. Do not initialize variables repeatedly; 5. When using synchronization mechanisms, try to use method synchronization instead of code. Block synchronization.
    JavaBase 2801 2019-11-19 13:42:10
  • How to solve Chinese garbled characters in Java?
    How to solve Chinese garbled characters in Java?
    Solution to Chinese garbled characters in Java: 1. Set the encoding format of the Java editor. This method can change the encoding of all projects. 2. Set the project code. This method modifies the code of a single project. 3. Set the encoding of a single file.
    JavaBase 109044 2019-11-19 13:31:45
  • How to install mobile java program
    How to install mobile java program
    How to install java program on mobile phone: first download the mobile version of java simulator; then open the simulator and select the location of the java program, and the simulator will automatically install the java program; finally click the start button to open the program.
    JavaBase 9646 2019-11-19 13:24:22
  • Determine whether a string is a number in java
    Determine whether a string is a number in java
    How to determine whether a string is a number in java: 1. Use the method Character.isDig(char ch) that comes with java to determine. 2. Use the regular expression "-?[0-9]+(\\.[0-9]+)?" to determine whether the string is a number.
    JavaBase 8808 2019-11-19 13:21:31
  • Determine whether a file or folder exists in java
    Determine whether a file or folder exists in java
    The method to determine whether a file or folder exists in Java is: You can use the "file.exists()" or "file.isDirectory()" method to determine whether the file or folder exists. If the file or folder exists, it will return true, otherwise it will return false.
    JavaBase 4748 2019-11-19 10:49:51
  • How to determine whether strings are equal in java
    How to determine whether strings are equal in java
    The method to determine whether strings are equal in Java is: You can use the "equals(object obj)" method to determine, for example: "a.equals(b)". If a and b are equal, it will return true, otherwise it will return false.
    JavaBase 2844 2019-11-19 09:37:05
  • How to assign values ​​to arrays in java
    How to assign values ​​to arrays in java
    The method of assigning values ​​to arrays in Java is: 1. Use "==" to assign values. At this time, the new array points to the storage space of the original array without re-applying for new space; 2. Use the "System.ararycopy" method to re-apply for the new array. storage space, and then copy the data in the original array.
    JavaBase 12055 2019-11-18 17:34:12
  • How to create an array in java
    How to create an array in java
    The methods of creating an array in Java are: 1. Declare and assign a value, such as: "int[] arr = {1,2,4, ...}"; 2. Declare the array name to open up space and assign a value, such as: "int[] arr ;arr = new int[]{1,2,3,…}”.
    JavaBase 13742 2019-11-18 17:21:18
  • The difference between inheritance and implementation in java
    The difference between inheritance and implementation in java
    The difference between inheritance and implementation in Java is: 1. The modifier of implementation is "implements", and the modifier of inheritance is "extends"; 2. When an interface is implemented by a class, the abstract method in the interface must be implemented in the class, and Inheritance can call methods at will.
    JavaBase 5707 2019-11-18 17:05:22
  • The difference between static methods and instance methods in java
    The difference between static methods and instance methods in java
    The difference between static methods and instance methods in Java is: when static methods access members of this class, they are only allowed to access static members, and are not allowed to access instance member variables and instance methods, but instance methods do not have this restriction.
    JavaBase 2952 2019-11-18 16:43:01
  • How to compare strings for equality in java
    How to compare strings for equality in java
    The way to compare whether strings are equal in Java is: you can use the "==" or "equals" method for comparison, but the "equals" method compares whether the contents of the strings are the same.
    JavaBase 4320 2019-11-18 16:28:38

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