Các câu hỏi phỏng vấn và câu trả lời về phần "Core Java: Basic of Java"
Khi đi phỏng vấn, ngôn ngữ lập trình Java thường được hỏi rất nhiều. Đây là một số câu hỏi và câu trả lời ngắn cốt lõi và trọng điểm về phần "Core Java: Basic of Java". Những câu hỏi này sẽ giúp ích cho bạn rất nhiều khi trả lời với nhà tuyển dụng
JVM is an acronym for Java Virtual Machine, it is an abstract machine which provides the runtime environment in which java bytecode can be executed. It is a specification.
JVMs are available for many hardware and software platforms (so JVM is platform dependent).
JRE stands for Java Runtime Environment. It is the implementation of JVM.
JDK is an acronym for Java Development Kit. It physically exists. It contains JRE + development tools.
Many types:
Just-In-Time(JIT) compiler:It is used to improve the performance. JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation.Here the term “compiler” refers to a translator from the instruction set of a Java virtual machine (JVM) to the instruction set of a specific CPU.
A platform is basically the hardware or software environment in which a program runs. There are two types of platforms software-based and hardware-based. Java provides software-based platform.
The Java platform differs from most other platforms in the sense that it's a software-based platform that runs on top of other hardware-based platforms.It has two components:
The bytecode. Java is compiled to be a byte code which is the intermediate language between source code and machine code. This byte code is not platform specific and hence can be fed to any platform.
The classloader is a subsystem of JVM that is used to load classes and interfaces.There are many types of classloaders e.g. Bootstrap classloader, Extension classloader, System classloader, Plugin classloader etc.
Yes, save your java file by .java only, compile it by javac .java and run by java yourclassname Let's take a simple example:
//save by .java only
class A{
public static void main(String args[]){
System.out.println("Hello java");
}
}
//compile by javac .java
//run by java A
No.
It is empty. But not null.
Program compiles and runs properly.
The local variables are not initialized to any default value, neither primitives nor object references.
NGUYỄN THỊ BẢO TRANG
» Tin mới nhất:
» Các tin khác: