current location:Home > Technical Articles > Java > JavaBase

  • Java implements a method to determine whether a file file exists
    Java implements a method to determine whether a file file exists
    The method for "java" to determine whether the "file" file exists is: To determine whether the file exists, you can use the "file.exists" method of the "File" class. First, you need to import the "File" class, and then save the file path that needs to be determined to In the object, the final judgment can be made by calling the "exists" method.
    JavaBase 4657 2019-11-30 09:40:03
  • Solution to garbled characters in java reading txt files
    Solution to garbled characters in java reading txt files
    When Java reads a txt file, you need to set the reading encoding. The encoding format of txt documents is written in the file header. In the program, the encoding format of the file needs to be parsed first. After obtaining the encoding format, reading the file in this format will not produce garbled characters.
    JavaBase 6980 2019-11-30 09:38:32
  • How to open specified exe file in java
    How to open specified exe file in java
    The method for "java" to open a specified "exe" file is: first instantiate it through the static method of the "Runtime" class, then save the file to be run into a variable, then call the native program through exception handling, and finally Just print the exception information.
    JavaBase 2758 2019-11-30 09:22:54
  • 4 examples of ways to copy files in java
    4 examples of ways to copy files in java
    When we are doing Java programming, we often operate on files. This article introduces four methods of copying files in Java, which are copying using FileStreams, copying using FileChannel, copying using Commons IO, and copying using the Files class of Java7.
    JavaBase 2422 2019-11-29 17:38:36
  • Java implements bubble sort algorithm
    Java implements bubble sort algorithm
    This article introduces the implementation of bubble sort from the java introductory program column. I hope it can help you. Bubble sort is an algorithm that compares adjacent elements and swaps their positions if they are in the wrong position. Sorting can be done in ascending or descending order.
    JavaBase 2463 2019-11-29 17:26:10
  • Exceptions in java you must know
    Exceptions in java you must know
    An exception is a problem that prevents the current method or scope from continuing to execute. The reason why Java proposes an exception handling mechanism is to tell developers that something is abnormal in your program, please pay attention. This article introduces the exception handling mechanism in Java in detail.
    JavaBase 1830 2019-11-29 17:21:17
  • The principle of Java dynamic proxy
    The principle of Java dynamic proxy
    The emergence of Java's dynamic proxy mechanism allows Java developers to dynamically obtain proxy classes without manually writing proxy classes. They can simply specify a set of interfaces and delegate class objects. This article explains in detail the principle of dynamic proxy in java.
    JavaBase 2067 2019-11-29 17:06:40
  • String identity judgment in java
    String identity judgment in java
    This article introduces the identity judgment of strings in Java from the java introductory column. I hope it can help you. "==" can only handle the identity judgment of corresponding values ​​of basic data types, and is not applicable to reference data types. In the Object class, the equals method is used to compare whether the references of two objects are equal.
    JavaBase 2439 2019-11-29 15:29:28
  • Sharing some questions about loop structures in java
    Sharing some questions about loop structures in java
    This article shares with you some common questions during the learning cycle, hoping to help students in need. The examples below demonstrate the problem-solving process for everyone, and also provide ideas for solving the problems. I hope you will read it carefully.
    JavaBase 2328 2019-11-29 14:20:36
  • Detailed explanation of java regular knowledge
    Detailed explanation of java regular knowledge
    Regular expressions define patterns of strings. Regular expressions can be used to search, edit or manipulate text. A string is actually a simple regular expression. This article introduces the meaning of various components of regular expressions in Java.
    JavaBase 2729 2019-11-29 13:11:33
  • Summary of methods to determine whether an object is empty in Java
    Summary of methods to determine whether an object is empty in Java
    There are three ways to determine whether an object is empty in "java", namely: 1. Traverse the object according to "for...in", if it exists, return "true", otherwise return "false"; 2. Use "ES6" Use "Object.keys()" to judge; 3. Use JSON's own method to judge.
    JavaBase 5658 2019-11-29 11:57:58
  • How to prevent duplicate elements in list collection in java
    How to prevent duplicate elements in list collection in java
    The method in "java" to make the elements in the "list" collection non-repeating is: first define a "list" object, then add several repeated elements through the "add" method, then instantiate an "ArrayList" object, and finally judge by traversing Just assign it to another "list" collection.
    JavaBase 5883 2019-11-29 11:30:21
  • Java page garbled solution
    Java page garbled solution
    Solutions to garbled java pages: 1. The garbled page submitted to tomcat can be solved by configuring the encoding format in tomcat/conf/server.xml. 2. If the JSP page is garbled, just use the "String(byte[],decode)" method at the beginning of the page to specify the encoding format.
    JavaBase 2304 2019-12-10 17:10:36
  • How to write an interface and implement it in java
    How to write an interface and implement it in java
    The way to define an interface and implement it in "java" is: the definition format is "interface interface name [extends other interface names] {variable declaration abstract method}". The interface implementation needs to use the "implements" keyword, and generally all of it needs to be implemented. method, otherwise it needs to be marked as an abstract class.
    JavaBase 5569 2019-11-29 11:14:59
  • Introduction to solutions to garbled characters in the Java console
    Introduction to solutions to garbled characters in the Java console
    Solution to garbled characters in java console: 1. Eclipse console: Select "Run Configuration" - "Common" - "Console Encoding" - "UTF-8" in the menu. 2. cmd: execute the chcp 65001 command.
    JavaBase 2343 2019-12-10 17:10:01

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