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:
-
- 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 3886 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 4880 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 3829 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 3197 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 5950 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 6708 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 3244 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 19618 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 2981 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 4449 2019-11-20 16:33:55
-
- How to determine whether a table exists in java?
- Methods to determine whether a table exists in java: 1. Use JdbcTemplate query to determine whether the table exists. 2. Use the Connection object to connect the table to determine whether the table exists.
- JavaBase 4021 2019-11-20 16:27:40
-
- Java determines whether it is a folder
- In java, you can use isDirectory() to determine whether it is a folder. isDirectory() checks whether an object is a folder. The return value is of type boolean. Returns true if so, false otherwise.
- JavaBase 3082 2019-11-20 16:00:25
-
- Java determines whether strings are equal
- How to determine whether strings are equal in Java: First, you can use "==" to compare references, for example: "a==b", and then you can also use the equals method to compare values, for example: "a.equals(b)", the values are equal then returns true.
- JavaBase 2276 2019-11-20 15:58:03
-
- How to enter a character in java
- How to input characters in java: first create a Scanner object, then call the "next()" method of the Scanner object to get the string input by the console, and finally call the "charAt(0)" method of String to get the first character.
- JavaBase 8536 2019-11-20 15:46:46
-
- Solution to Java reading txt garbled characters
- Solution to Java reading txt garbled code: 1. Unify the encoding of java projects and txt files to utf-8. 2. Use the InputStreamReader(new FileInputStream(fileUrl), "utf-8") method to set the txt text encoding to utf-8 .
- JavaBase 3391 2019-11-20 15:43:58