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