
What are the methods of Object class in java
The methods in the Object class in Java are: 1. "clone()" method, a protection method, which implements shallow copying of objects; 2. "getClass()" method, which obtains the runtime type; 3. "finalize()" method , this method is used to release resources.
Nov 21, 2019 pm 05:14 PM
What is an exception that is not thrown in java
The exceptions that are not thrown in Java are: "RuntimeException" and its subclasses, such as: Null pointer exception "NullPointerException" and subscript out-of-bounds exception "IndexOutOfBoundsException".
Nov 21, 2019 pm 04:59 PM
How java files are run
The method to run a java file is: first prepare a JDK, then add the JDK's bin directory to the PATH environment variable, then open the command line and run the javac command to compile the java file, and finally use the java command to execute the compiled java file.
Nov 21, 2019 pm 04:28 PM
When compiling java, it prompts that javac cannot find the file.
The solution to the problem that javac cannot find the file when compiling java: first switch to the storage path of the java class through the cd command, and then compile the java file. If there is a compilation error, modify the java class code according to the error message, and finally re-run the java file.
Nov 21, 2019 am 10:58 AM
The difference between i++ and ++i in java
The difference between "i++" and "++i" in Java is: "i++" assigns the value first and then operates; "++i" operates first and then assigns the value. For example: "b = a++" means to first assign the value of a to b, and then calculate +1; "c = ++a" means to first calculate the value of a + 1, and then assign the value of a to c.
Nov 21, 2019 am 10:45 AM
What does '=' in java mean?
The symbol "=" in Java has two meanings. For variables, the symbol "=" has the function of assignment. For example: "a=3" means assigning 3 to a; for reference objects, the symbol "=" has the function of assignment. The function of passing by reference, for example: "a=b", means to point the pointer of object a to the address of object b.
Nov 21, 2019 am 10:24 AM
The difference between '/' and '%' in java
The difference between the operators "/" and "%" in Java is: "%" is the modulo operator, which performs remainder operations, while "/" is the division operator, which performs simple division operations. For example: "13/5", the result is the integer 2, and "13%5", the result is the integer 3.
Nov 21, 2019 am 10:10 AM
What are the common locks in Java?
Common locks in Java are: 1. Fair lock, which refers to multiple threads acquiring locks in the order in which they apply for locks; 2. Unfair lock, which refers to the order in which multiple threads acquire locks; 3. Exclusive lock, which refers to the lock once Can only be held by one thread; 4. Shared lock means that the lock can be held by multiple threads.
Nov 20, 2019 pm 05:43 PM
What does a reference in java mean?
A reference in Java refers to an alias of an existing object. A reference can only be bound to an object, and cannot be bound to a literal value or the calculation result of an expression.
Nov 20, 2019 pm 04:48 PM
Choose java development or embedded development
Both Java development and embedded development are relatively common development positions in the IT industry. Java is mainly used in web development, android development, etc., while embedded development is mainly used in the field of Internet of Things development. Both are good choices.
Nov 20, 2019 pm 03:04 PM
Several methods to get class name in java
The method of obtaining the class name in Java is: 1. "getName()" returns the class name representation of the class in the virtual machine; 2. "getSimpleName()" returns the abbreviation of the class; 3. "getCanonicalName()" returns the easier to understand The class name represents.
Nov 20, 2019 pm 02:47 PM
How to output data in java
To output data in Java, you can use the "System.out.println()" statement. This statement is the most commonly used output statement. This statement converts the content in parentheses into a string and outputs it to the console, and wraps the line.
Nov 20, 2019 pm 01:26 PM
The process of calling functions in java
The process of calling a function in java: first create a class, write the main function, then create another class and private parameters, then create several functions, create objects in the main function, and finally call the function using the format "object.method name".
Nov 20, 2019 pm 01:14 PM
What are static objects and methods in java
Static objects and methods in Java refer to variables and methods modified by the "static" keyword. Static objects and static methods belong to the entire class, not to a certain object, that is, they are shared by all objects of the class.
Nov 20, 2019 am 11:34 AM
Hot tools Tags

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version
Chinese version, very easy to use
