First, Java's three major technical architectures
A: Java EE, the development of applications in the enterprise environment, mainly for Web-based program development
Javase, completing the development of desktop applications is the foundation of the other two
Javame, the development of electronic consumer products and embedded devices, such as mobile phone programs
Ii. differences between JDK and JRE
A: Jdk:java development and operating environment, Java development tool box JRE.
Jre:java the running environment of the program, the required class library +JVM (Java Virtual machine) for Java to run.
Iii. What do javac commands and Java commands do?
A: The Javac command is used to compile the Java file, and the Java command can execute the generated class file
Iv. Java data types
A: The basic data types are byte, int, char, long, float, double, Boolean, and short.
java.lang.String class is final type
V. & and && differences
A:& is a bitwise operator that represents the bitwise AND Operation,&& is a logical operator, which represents the logical and (and)
Six, | and | | Difference
Answer:| | is a logical judgment, | | are Boolean expressions and then perform logic or operations.
| is a numerical operation, | The left and right is a binary number, and then based on, binary number, or operation.
Vii. Object-oriented
Answer: 1:, simplify the complex things
2, object-oriented to the previous process of the executor, into the commander.
· 3, object-oriented thinking is in line with the current thinking habits of people.
What is the difference between heap and stack?
For:Java divides memory into two types: one is stack memory, and the other is heap memory.
Some of the basic types of variables and object reference variables defined in the function are allocated in the stack memory of the function.
When a variable is defined in a block of code, Java allocates memory space for the variable in the stack, and when the scope of the variable is exceeded, Java automatically frees up the allocated memory space for that variable, and the memory space can be immediately Use.
heap memory is used to hold objects and arrays created by new.
The memory allocated in the heap is managed by the automatic garbage collector of the Java Virtual machine.
after generating an array or an object in the heap, you can also define a special variable in the stack that is equal to the first address of the array or object in the heap memory, and this variable in the stack becomes the reference variable of the array or object.
A reference variable is a name that is an array or an object, and you can use reference variables from the stack to access the arrays or objects in the heap later in your program.
Nine, the difference between the member variable and the local variable?
A: The local variable must be initialized, the member variable can be initialized without initialization, and the system will initialize automatically.
10. What is the difference between a constructor and a general function?
a :1: Two function definition formats are different.
2: constructors are called when an object is created, used for initialization, and initialization actions are performed only once.
The general function is that after the object is created, it needs to be called to execute and can be called multiple times.
What is the difference between constructing a code block and a constructor function?
Answer: Constructing blocks of code: Initializes all objects, that is, all objects call a block of code. As soon as Object one is established. This code block is called.
Constructor: Initializes the object to which it corresponds. It is targeted.
This article is from the "Java" blog, so be sure to keep this source http://9840338.blog.51cto.com/9830338/1711557
Java face question