current location:Home > Technical Articles > Java > JavaBase

  • How to define interface in java
    How to define interface in java
    The way to define an interface in Java is: Interfaces are usually declared with the interface keyword. An interface is an abstract type in the Java language and a collection of abstract methods. Declaration syntax format: [[modifier] interface interface name {declared variable abstract method}].
    JavaBase 4889 2020-07-11 10:10:09
  • What is the function of continue statement
    What is the function of continue statement
    The function of the continue statement is to end the current loop and enter the next loop. That is, only this loop ends, not all loops end, and subsequent loops still continue. The continue statement can only be used in loop statements.
    JavaBase 21742 2020-07-11 09:13:17
  • Can constructors be inherited in Java?
    Can constructors be inherited in Java?
    Constructors cannot be inherited in Java. When a subclass inherits from a parent class, it first runs the parent class constructor. That is to say, when running the subclass, the parent class's constructor will be called first. Constructors are generally used to initialize member properties and member methods.
    JavaBase 3775 2020-07-09 14:32:01
  • How to convert string to array in java
    How to convert string to array in java
    The way to convert a string into an array in Java is through the split method, which splits the string according to matching a given regular expression. Specific usage: [String[] arr = str.split(",")], which means splitting the string with commas and storing it in an array.
    JavaBase 18033 2020-07-09 14:14:17
  • What command do you need to use to compile a java program?
    What command do you need to use to compile a java program?
    To compile a java program you need to use the javac command. The usage method is: 1. Open the command prompt and enter the directory where the Java file is located; 2. Execute the [javac file name.java] command and press Enter. At this time, a class file will be generated in the directory where the Java file is located.
    JavaBase 25894 2020-07-09 13:33:59
  • What are the Boolean logical operators?
    What are the Boolean logical operators?
    There are four types of Boolean logical operators, namely: And (logical AND), Or (logical OR), Not (logical negation), and Xor (logical exclusive OR). For logical AND, the result is true only if both operands are true. For logical OR, the result is false only if all operands are false.
    JavaBase 36879 2020-07-06 09:59:42
  • What does import java.util.* mean?
    What does import java.util.* mean?
    [import java.util.*;] is to import the class interface in the java.util package. The function of import in Java is to import the class interface in the package to be used. Import is at the beginning of the java file. Let’s first explain what will be used. Those categories, then we can specify a class in the code using just the class name.
    JavaBase 13778 2020-07-04 15:52:16
  • What are the four ways to create a thread pool in java
    What are the four ways to create a thread pool in java
    The four ways to create a thread pool in java are: 1. newCachedThreadPool creates a cacheable thread pool; 2. newFixedThreadPool creates a fixed-length thread pool; 3. newScheduledThreadPool creates a fixed-length thread pool.
    JavaBase 11237 2020-07-04 15:44:43
  • Check what java version is
    Check what java version is
    The method to check the java version is: first open the computer desktop, use the shortcut key [win+R] to enter cmd to bring up the window; then enter [java -version] in the window; finally press Enter to view the version.
    JavaBase 4413 2020-07-04 15:10:08
  • What does extends mean in java
    What does extends mean in java
    The role of extends in Java is to inherit. In Java, an existing class is inherited through the keyword extends. The inherited class is called the parent class [super class, base class], and the new class is called a subclass [ Derived classes], and multiple inheritance is not allowed in Java.
    JavaBase 23340 2020-07-03 17:57:27
  • What is the function of finalize method in java
    What is the function of finalize method in java
    The finalize method in java is a method provided in the Object class. Before the GC is ready to release the memory space occupied by the object, it will first call the finalize() method.
    JavaBase 4588 2020-07-03 15:34:34
  • What are the formats for defining arrays in java?
    What are the formats for defining arrays in java?
    The formats for defining arrays in Java are: 1. [int[] arr = new int[5]]; 2. [int[] arr = new int[]{1,2,3,4,5}]. In the Java language, the length (the number of elements in the array) cannot be specified when declaring an array.
    JavaBase 5438 2020-07-03 14:50:02
  • What is the difference between hashcode and equals?
    What is the difference between hashcode and equals?
    The difference between hashcode and equals is: 1. If equals of two objects returns true, hashCode must also return the same int number; 2. If hashCode of two objects returns the same int number, equals does not necessarily return true.
    JavaBase 6002 2020-07-03 12:00:50
  • Talk about serialization and deserialization in Java objects
    Talk about serialization and deserialization in Java objects
    The concepts of serialization and deserialization: The process of converting an object into a byte sequence is called serialization of the object. The process of restoring a sequence of bytes into an object is called deserialization of the object.
    JavaBase 2413 2020-07-03 10:04:38
  • Can a java class have multiple parent classes?
    Can a java class have multiple parent classes?
    A Java class cannot have multiple parent classes, but only one parent class. Java classes only support single inheritance and do not support multiple inheritance, so they can only have one parent class; interfaces can have multiple inheritance, so interfaces can have multiple parent classes.
    JavaBase 12608 2020-07-03 09:40:55

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!