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 call the java interface (with code)
- Interface calling method in java: Create a url class to connect to the target interface address, use setRequestMethod to select a request method, use setDoInput() to set whether to output to httpUrlConnection, and use the close() method to create a stream to write or read interface data.
- JavaBase 3380 2019-11-26 09:28:21
-
- A brief discussion on java enumeration classes (with code)
- JDK1.5 introduced a new type - enumeration. Although it is a "small" function in Java, it brings "big" convenience to our development. This article provides you with a quick introduction to enumeration methods in Java.
- JavaBase 2086 2019-11-25 16:57:02
-
- Detailed explanation of inheritance in Java
- Java is an object-oriented programming language that is both powerful and easy to use. This article introduces the inheritance method in Java in detail. Java inheritance can construct a new class based on an existing class.
- JavaBase 2300 2019-11-25 16:45:12
-
- The operation principle of ternary operator in java
- This article explains the operating principle of the ternary operator from the Java Programming Introduction column, hoping to help students in need. Operation principle: The result of a Boolean type expression is true, and the overall result of the ternary operator is result 1, which is assigned to a variable; conversely, the overall result of the ternary operator is result 2, which is assigned to a variable.
- JavaBase 3048 2019-11-25 15:42:51
-
- How to implement quick sort in java
- Below, the java introductory learning column will introduce how to implement quick sorting in java. I hope this algorithm sorting can help everyone! The key to implementing quick sorting is to divide the numbers in the array into two parts with a certain number as the midpoint. Numbers smaller than the selected number are moved to the left of the array, and numbers larger than the selected number are moved to the right of the array.
- JavaBase 2807 2019-11-25 14:23:53
-
- How to determine whether a file folder exists in java (code attached)
- Method to determine whether a file folder exists in Java: In Java, you can use the exists() method to determine whether the file or folder represented by the abstract path name exists, and then you can use the isDirectory() method to determine whether the object is a folder.
- JavaBase 24107 2019-12-06 15:30:28
-
- How to generate n different random numbers within a specified interval in java
- The method of generating n different random numbers in a specified interval in "java" is: first determine whether the number of random numbers to be output has been reached, then define an array of length n to store the results, and then use a loop to generate random numbers Just assign values to the array.
- JavaBase 3647 2019-11-25 11:47:08
-
- How to install java
- How to install java: 1. Download jdk first and install it according to the prompts. You can customize the installation directory during the installation process. 2. Configure the environment variables, configure the three environment variables JAVA_HOME, PATH, and CLASSPATH respectively.
- JavaBase 32184 2020-07-13 16:23:16
-
- Determine whether a directory exists in java and create it if it does not exist
- In "java", the way to determine whether a directory exists, and if it does not exist, is to create the directory: first save the directory to be determined into an object, and then use the "exists()" method to determine whether the directory exists. If the directory does not exist, proceed further. Just use the "mkdirs()" method to create a directory.
- JavaBase 4733 2019-11-25 11:28:52
-
- Summary of methods to determine the day of the week in java
- How to determine the day of the week a date is in Java: 1. Use the Calendar class to get the day of the week the specified date is. The value obtained by this method is 1-7, which means Sunday-Saturday. 2. Use the SimpleDateFormat class to format the date to get the day of the week.
- JavaBase 7378 2019-12-06 15:29:08
-
- How to input from the keyboard in java (with code)
- Methods to obtain keyboard input in java: 1. Use the Scanner class (next() and nextLine() methods to obtain the input string) to read integer or float data from the keyboard. 2. Use the BufferedReader class to read strings from the keyboard.
- JavaBase 14147 2019-12-06 15:28:32
-
- The difference between set and list interfaces in Java Collection
- The difference between the "set" interface and the "list" interface in the "collection" interface in "java" is: The most important difference between the "list" interface and the "set" interface is whether duplicate elements are allowed to exist. In the "list" interface The "set" interface allows the insertion of duplicate elements, while the "set" interface does not allow the existence of duplicate elements.
- JavaBase 3587 2019-11-25 11:04:37
-
- How to execute java (command execution)
- Java file execution method: 1. Use "javac+path+x.java" to compile the java file, and use the command "java -cp+path+filename" to execute the java file. 2. Enter the directory where the java file is located, use the command "javac x.java" to compile, and then use the java command to execute.
- JavaBase 4333 2019-12-06 15:27:50
-
- Summary of Java methods to determine whether a variable is a number
- How to determine whether a variable is a number in Java: 1. Use the isDigit() function to determine. 2. First define the regular expression "[0-9]*", and then use matches() to match this regular expression. 3. Use org.apache.commons.lang to judge.
- JavaBase 3358 2019-11-25 10:34:36
-
- Summary of methods for generating non-repeating random numbers in java
- Methods to generate non-repeating random numbers in java: 1. Use ArrayList or array implementation, use the Random() method to generate random numbers and save them in the array, and then deduplicate the array. 2. Use HashSet and HashMap functions to achieve this. These two methods do not allow duplication.
- JavaBase 8140 2019-11-25 10:24:12