current location:Home > Technical Articles > Java > JavaBase
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to delete files in java
- Deleting files in java can be achieved using the File.delete() method. The Java File class represents file names and directory pathnames in an abstract way. This class is mainly used for creating files and directories, searching for files, and deleting files.
- JavaBase 5865 2019-12-27 11:54:59
-
- How to determine whether a file is an image in java
- How to determine whether a file is an image in Java: 1. Determine by the file suffix name. 2. Determine the file type through the file header. 3. Judge by MimetypesFileTypeMap. 4. Judge through ImageIO.
- JavaBase 9134 2019-12-27 11:37:06
-
- The difference between java inheritance and interface
- The difference between java inheritance and interface: 1. Use different modifiers to modify. 2. Only global constants and abstract methods can be defined in interfaces, while attribute methods, variables, constants, etc. can be defined in inheritance.
- JavaBase 4151 2019-12-27 10:48:41
-
- How to generate random numbers in java
- How to generate random numbers in java: 1. Use the java.util.Random class to generate a random number generator to generate random numbers. 2. Use the Math.random() method to generate random numbers. 3. Use the currentTimeMillis() method to generate random numbers.
- JavaBase 7631 2019-12-27 10:35:27
-
- How to call variables in java
- How to call variables in Java: 1. Use new to create a variable in the class, and then call the variable by calling a public variable in the class. 2. Define the variable as a static public variable, and then obtain it directly using the class name.variable name. 3. Use methods or interfaces to pass this variable from other classes.
- JavaBase 4895 2019-12-27 10:21:40
-
- Java determines whether the date is legal
- In java, you can first use SimpleDateFormat to specify the date format, and then use the setLenien(false) method to strictly parse the date, and determine whether the date is legal by checking whether an exception is thrown.
- JavaBase 4191 2019-12-27 10:00:24
-
- What are the unique collections in java?
- Unrepeated collections in Java: 1. Set collection. The methods to implement set collections include hashSet, linkedHashSet, and treeSet. 3. Map collection, in which keys are not allowed to be repeated, but values can be repeated.
- JavaBase 21413 2019-12-27 09:47:13
-
- How to import jar package in java project
- How to import the jar package in the java project: Create a new folder in the java project and save the jar package, then right-click the jar package and select "Build Path" - "Add to Build Path".
- JavaBase 12372 2019-12-27 09:32:13
-
- What is java swing?
- Swing is a development toolkit (GUI toolkit) for developing Java application user interfaces and is part of the JAVA basic class; it includes graphical user interface (GUI) devices such as: text boxes, buttons, separated panes and surface.
- JavaBase 7218 2019-12-26 18:04:05
-
- What does reflection in java mean?
- Reflection is a mechanism for indirectly operating on target objects. The Java reflection mechanism is that when a Java program is running, for any class, all properties and methods of the class can be known; for any object, any method of it can be called. This function of dynamically obtaining and calling object methods is called the reflection mechanism of the Java language.
- JavaBase 3579 2019-12-26 17:54:46
-
- What is the difference between js and java?
- Differences: 1. Java is an object-oriented language, and JavaScript is a scripting language, which is an object- and event-driven language. 2. Java uses static binding; Js uses dynamic binding.
- JavaBase 8708 2019-12-26 17:31:24
-
- What is java concurrency?
- Concurrency refers to the alternate execution of multiple tasks within a certain period of time. When multiple threads are operating, the CPU running time is divided into several time periods, and then the time periods are allocated to each thread for execution. While one thread's code is running, other threads are suspended.
- JavaBase 4041 2019-12-26 17:13:06
-
- What are the classes that cannot be inherited in Java?
- Classes marked final in Java are final classes and cannot be inherited, such as public, final, and String. When final is used to modify a class, it means that the class cannot be inherited.
- JavaBase 5306 2019-12-26 16:34:05
-
- How to implement delay in java
- Methods to implement delay in java: 1. Use the Timer class to implement it. The schedule method of the Timer class can execute the program according to the time plan. 2. Use the Thread class, and ordinary delays can be implemented using the Thread.sleep(int) method.
- JavaBase 8258 2019-12-26 16:17:47
-
- Solution to Chinese garbled characters when running java using cmd
- Solution to Chinese garbled characters when cmd runs java: 1. Use the "chcp 65001" command in cmd to set the cmd encoding to utf-8. 2. Specify the encoding method when executing java in cmd.
- JavaBase 17008 2019-12-26 15:32:05