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:
-
- 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 2838 2020-06-01 15:04:19
-
- 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 5219 2020-06-01 11:00:04
-
- 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 6518 2020-05-31 12:00:32
-
- 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 15915 2020-05-30 11:50:34
-
- 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 5933 2020-05-25 14:42:26
-
- 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 2873 2020-05-25 11:38:12
-
- 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 3202 2020-05-25 09:59:47
-
- 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 5874 2020-05-20 16:58:23
-
- 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 3177 2020-05-18 17:22:57
-
- 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 3371 2020-05-18 17:01:35
-
- 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 4743 2020-05-17 15:21:51
-
- 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 3233 2020-05-17 15:05:14
-
- 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 4533 2020-05-17 14:47:19
-
- 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 2712 2020-05-17 14:38:06
-
- 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 2283 2020-05-17 14:28:42