current location:Home > Technical Articles > Java > JavaBase

  • How to call the java interface (with code)
    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)
    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
    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
    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
    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)
    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
    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
    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
    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
    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)
    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 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)
    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
    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
    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

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