current location:Home > Technical Articles > Java > JavaBase
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- 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
- 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
- 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
- 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
- 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
- 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 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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