current location:Home > Technical Articles > Java > JavaBase
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- 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
- 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 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?
- 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?
- 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?
- 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 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
- 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
- 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
- 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
- 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
- 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 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 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
- 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