current location:Home > Technical Articles > Java > JavaBase

  • How to run java program in dos
    How to run java program in dos
    The method to run a java program in dos is: 1. Enter the location of the java file that needs to be run, such as D:\test\Test.java; 2. Execute the [javac Test.java] command to compile the file; 3. Execute [java Test] command to run the program.
    JavaBase 2852 2020-06-01 15:04:19
  • What is the mechanism by which Java implements polymorphism?
    What is the mechanism by which Java implements polymorphism?
    The mechanism for realizing polymorphism in Java relies on the reference of the parent class or interface to point to the subclass, thereby realizing the characteristics of multiple forms of an object. The reference of the parent class dynamically points to the specific instance at runtime and calls the method of the reference. When running, it is not run according to the method defined in the type of the reference variable, but according to the method of the specific instance.
    JavaBase 5232 2020-06-01 11:00:04
  • What are the loop statements in java
    What are the loop statements in java
    The loop statements in Java are: 1. while loop, the syntax structure is [while (Boolean expression) {loop content}]; 2. do...while loop, the syntax structure is [do{code statement}while (Boolean expression Mode);】.
    JavaBase 6533 2020-05-31 12:00:32
  • What should I do if the javac command prompts that the file cannot be found?
    What should I do if the javac command prompts that the file cannot be found?
    The solution to the problem that the file cannot be found when executing the javac command is: 1. Enter the advanced setting options of the computer; 2. Uncheck the [Hide extensions for known file types] option; 3. Enter the directory where the java file is located; 4. Restart Just execute the javac command.
    JavaBase 15922 2020-05-30 11:50:34
  • What is the usage of toString() method in java
    What is the usage of toString() method in java
    The usage of the toString() method in java is: return a Number object value represented by a string. The specific code is such as [Integer.toString(int i), which returns a String object representing the specified int.
    JavaBase 5954 2020-05-25 14:42:26
  • How to define an interface in java
    How to define an interface in java
    The way to define an interface in Java is: you can use the interface keyword to define the interface, the specific code is such as [public interface usb{}]. If we want to implement an interface, then we need to use the implements keyword.
    JavaBase 2885 2020-05-25 11:38:12
  • What is the creation process of java objects
    What is the creation process of java objects
    The creation process of java objects is: 1. Class loading check; 2. Allocate memory, there are two methods: pointer collision and free list; 3. Initialize zero value, initialize the allocated memory space to zero value; 4. Set the object Header; 5. Execute the init method initialization.
    JavaBase 3220 2020-05-25 09:59:47
  • What is method overriding in java
    What is method overriding in java
    Method overriding in Java is also called rewriting, that is, the subclass redefines the method of the parent class. Things to note are: 1. The overridden method must have the same method name, parameter list, and return value type as the original method; 2. The overridden method cannot be of final type.
    JavaBase 5887 2020-05-20 16:58:23
  • There are several types of streams in java
    There are several types of streams in java
    There are three types of streams in Java, which are: 1. Byte stream, including file byte stream and buffered byte stream; 2. Character stream, including file character stream and buffered character stream; 3. Convert streams, including InputStreamReader and OutputStreamWriter.
    JavaBase 3196 2020-05-18 17:22:57
  • What is the difference between list and set in java
    What is the difference between list and set in java
    The difference between list and set in Java is: 1. The list method can allow duplicate objects, and the set method does not allow duplicate objects; 2. List can insert multiple null elements, and set only allows one null element to be inserted; 3. List is a An ordered container, the set method is an unordered container.
    JavaBase 3378 2020-05-18 17:01:35
  • What is the difference between stack memory and heap memory in Java?
    What is the difference between stack memory and heap memory in Java?
    The difference between stack memory and heap memory in Java is: 1. Stack memory is used to store basic types of variables and reference variables, and heap memory is used to store objects in Java; 2. Variables stored in stack memory can only be stored in the thread to which they belong. Visible in , objects in heap memory are visible to all threads.
    JavaBase 4759 2020-05-17 15:21:51
  • What is the difference between jre and jdk in java
    What is the difference between jre and jdk in java
    The difference between jre and jdk in java is: jre is the java running environment, including the java virtual machine and the core class libraries required by java programs; jdk is a development tool kit, which is provided to java developers and includes java Development tools also include jre.
    JavaBase 3250 2020-05-17 15:05:14
  • What is the difference between get and post in java
    What is the difference between get and post in java
    The difference between get and post in Java is: 1. Get obtains data from the server, and post transmits data to the server; 2. The amount of data transmitted by get is smaller, and the amount of data transmitted by post is larger; 3. Get is more secure. Low, post security is higher.
    JavaBase 4552 2020-05-17 14:47:19
  • What web servers are there in java
    What web servers are there in java
    The web servers in Java include: 1. Tomcat server, which is the first choice for beginners to learn to develop JSP applications; 2. Resin server, which is a very popular server that supports servlets and JSP; 3. JBoss server, which is a development source Code-based, pure java EJB server.
    JavaBase 2725 2020-05-17 14:38:06
  • What is a singleton in javaweb
    What is a singleton in javaweb
    The singleton in javaweb means that all requests are processed with an object. For example, the objects in our commonly used service and dao layers are singletons. The reason why a singleton is used is because there is no need to create a new object for every request, because this wastes both CPU and memory.
    JavaBase 2296 2020-05-17 14:28:42

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