current location:Home > Technical Articles > Java > JavaBase

  • What to do if the dataoutputstream is garbled?
    What to do if the dataoutputstream is garbled?
    Solution to garbled dataoutputstream: 1. Write String through "dos.write("...".getBytes());"; 2. Set "new OutputStreamWriter(new FileOutputStream(file), "utf-8") ;" That's it.
    JavaBase 30663 2023-01-05 11:28:53
  • Several ways of paging in mybatis
    Several ways of paging in mybatis
    Mybatis paging method: 1. Use arrays for paging. First query all the data, and then intercept the required parts from the list. 2. Use the Sql statement to perform paging, and add the limit paging statement after the sql statement. 3. Use the interceptor for paging, and add the limit statement to the end of the sql statement through the interceptor to perform paging queries. 4. To use RowBounds to implement paging, you need to obtain all qualified data at once, and then operate the big data in memory to achieve the paging effect.
    JavaBase 7100 2023-01-04 16:23:34
  • Several ways to implement multithreading in java
    Several ways to implement multithreading in java
    Ways to implement multi-threading: 1. Inherit the Thread class, rewrite the run method of the Thread class through the Thread class provided by JDK; 2. Implement the Runnable interface, Runnable is a "@FunctionalInterface" functional interface, which means You can use the lambda method provided by JDK8 to create thread tasks; 3. Use internal classes; 4. Use timers; 5. Thread implementation with return values; 6. Implement multi-threading based on thread pools.
    JavaBase 9435 2023-01-04 15:52:49
  • How to set eclipse language to Chinese
    How to set eclipse language to Chinese
    How to set the eclipse language to Chinese: 1. Open the browser to find the language pack download address, and copy the latest installation package address; 2. Open eclipse, click "help", and then click to install a new plug-in; 3. Click "Add ", paste the URL in Location; 4. Find the Simplified Chinese package in the drop-down menu, check it, click Next and wait for installation; 5. Restart eclipse.
    JavaBase 5573 2023-01-04 15:51:00
  • What is spring boot?
    What is spring boot?
    Spring Boot is a Spring-based framework provided by the Pivotal team that uses a specific way to configure, so that developers no longer need to define boilerplate configurations. Spring Boot integrates most of the currently popular development frameworks. Just like Maven integrates all JAR packages, Spring Boot integrates almost all frameworks, allowing developers to quickly build Spring projects.
    JavaBase 38707 2022-11-29 11:46:44
  • What is the abbreviation of the running environment of java program?
    What is the abbreviation of the running environment of java program?
    The running environment of java programs is referred to as "JRE". JRE is a collection of environments necessary to run JAVA programs, including JVM standard implementation and Java core class libraries. JRE consists of two parts: 1. Java Runtime Environment, which is a Java platform on which applications can be run, tested, and transmitted; 2. Java Plug-in, which allows Java Applets and JavaBean components to run in browsers that use JRE.
    JavaBase 12915 2022-11-28 19:17:35
  • What is the function of java final keyword
    What is the function of java final keyword
    In Java, final can be used to modify classes, methods and variables. The final modified class means that the class cannot be inherited by any other class, which means that this class is a leaf class in an inheritance tree, and the design of this class has been considered perfect and does not need to be modified or extended. The method in the final modified class means that the class cannot be inherited by any other class and cannot be overridden; that is, the method is locked to prevent the inherited class from changing it. final modifies a variable in a class, indicating that the variable cannot be changed once it is initialized.
    JavaBase 24568 2022-11-25 16:26:26
  • What does private mean in java
    What does private mean in java
    In Java, private means "private" and is an access control modifier used to modify classes, properties and methods. Class members modified with private can only be accessed and modified by the methods of the class itself, and cannot be accessed and referenced by any other class (including subclasses of the class); therefore, the private modifier has the highest level of protection.
    JavaBase 20335 2022-11-24 18:27:33
  • There are several thread states in java
    There are several thread states in java
    Java has 6 thread states: initial (NEW), running (RUNNABLE), blocked (BLOCKED), waiting (WAITING), timeout waiting (TIMED_WAITING), and terminated (TERMINATED). Use the new keyword to create a new thread, but the start() method has not been called. The thread is in the new state; the blocked state indicates that the thread is waiting for the monitor lock and is trapped in the state; the thread that enters the waiting state needs to wait for other threads to make a decision Some specific action (notification or interrupt).
    JavaBase 14345 2022-11-24 16:03:03
  • What are the characteristics of java
    What are the characteristics of java
    Characteristics of Java: 1. Object-oriented; it has good support for classes, objects, inheritance, encapsulation, polymorphism, interfaces, packages, etc. in objects. 2. Platform independence; after the introduction of the virtual machine, the Java language does not need to be recompiled to run on different platforms. 3. Simplicity. 4. Interpretation and execution; when the program is run on the Java platform, it will be compiled into a bytecode file, and then it can be run on an operating system with a Java environment. 5. Support multi-threading and provide synchronization mechanism between multi-threads; 6. Distribution; 7. Robustness; 8. High performance; 9. Security.
    JavaBase 47588 2022-11-22 17:55:06
  • What is the difference between heap and stack
    What is the difference between heap and stack
    Differences: 1. The heap space is generally allocated and released by the programmer; while the stack space is automatically allocated and released by the operating system. 2. The heap is stored in the second-level cache, and the life cycle is determined by the garbage collection algorithm of the virtual machine; while the stack uses the first-level cache, which is usually in the storage space when it is called, and is released immediately after the call is completed. 3. The data structures are different. Heap can be regarded as a tree, while stack is a first-in, last-out data structure.
    JavaBase 9696 2022-11-22 16:13:03
  • What is the execution order of static code blocks, construction code blocks, and construction methods?
    What is the execution order of static code blocks, construction code blocks, and construction methods?
    The execution order is: first execute the "static code block", then execute the "constructive code block", and finally execute the "constructive code block". Static code blocks are at the class level, while structural code blocks and construction methods are at the instance level, so the static code blocks are executed first; and because the structural code blocks are independent and must rely on a carrier to run, the structural code blocks need to be placed in the structure before method.
    JavaBase 15050 2022-01-25 11:41:17
  • Java annotations - Java's own configuration files
    Java annotations - Java's own configuration files
    Author's message Hello, everyone, this is my first article. I hope to summarize the knowledge I have learned and share it with everyone. In the next period of time, I will release a series of entry-level articles such as Java and Python. Relevant articles should be shared in a systematic way, so that you can go further by laying a solid foundation. I hope you all will give me some advice!
    JavaBase 2182 2022-01-07 13:41:51
  • What is the difference between scala and java
    What is the difference between scala and java
    Differences: 1. Java needs to explicitly use return to return values; while scala's return is optional. 2. Class and method modifiers, scala defaults to public, and java defaults to protected. 3. Java supports interfaces; Scala does not support interfaces and uses traits.
    JavaBase 14610 2023-01-13 00:40:03
  • What are memory leaks and memory overflows in java
    What are memory leaks and memory overflows in java
    A memory leak means that after a program applies for memory, it cannot release the allocated memory space. Memory overflow means that when the program applies for memory, there is not enough memory for the applicant to use; or it provides a storage space to store int data, but long data is stored, the result is that the memory is not enough, and an OOM error is reported. The accumulation of memory leaks will eventually lead to memory overflow.
    JavaBase 15584 2023-01-13 00:40:03

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