Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the Java platform

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

How to understand the Java platform? in view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

How to understand the Java platform?

When you hear this question, you may be a little overwhelmed. This question to tell the truth is a bit general, too open!

If you were a little nervous at that time. Uh, pause. I feel a little at a loss! So how to answer this question?

In fact, for this kind of more general questions, first of all, you should be confident and let your answers make the interviewer feel that your knowledge is systematic rather than fragmented! And want the interviewer to think that you are a person who knows what it is and why!

For example, the answer: Java is an object-oriented language, it is cross-platform, write once, run everywhere (Write once,run anywhere). Because Java compiles the source code through JavaC to generate bytecode. Bytecode is not machine code that can be run directly, but the bytecode is converted into the final machine code through the interpreter of JVM. So Java is because JVM shields the details of the operating system and hardware to achieve cross-platform!

And there's a garbage collector. Java collects and allocates memory through garbage collectors. In most cases, our coding does not need to worry about memory collection and allocation. Common garbage collectors include SerialGC,ParallerGC,CMS,G1 and so on. (of course, if you are not familiar with these words, don't say it, don't dig holes for yourself.)

And usually will also come into contact with JRE and JDK. JRE (Java Runtime Environment), the Java runtime environment, includes JVM, Java class libraries, and so on. While JDK (Java Development Kit) can be regarded as a superset of JRE, it also provides some tools such as various diagnostic tools: jstack,jmap,jstat, etc. (note that these tools are not familiar with! )

Of course, this is not the standard answer, as long as you tell what you know about Java and what you have done in this area, so as to make the interviewer feel that you are actually a person willing to dig and understand things in depth.

In general, this kind of question is the first question at the beginning, your answer is actually directed, you can lead the knowledge to the places where you know more! Generally speaking, the interviewer will follow the questions you say, unless you speak too deeply, and the interviewer doesn't understand!

For example, the above answer: JVM's interpreter converts the bytecode into the final machine code. For example, you are not familiar with garbage handlers but you are very familiar with class loading, you know BootstrapClassLoader,ApplicationClassLoader,ExtensionClassLoader. Know the class loading process: load, verify, link, initialize. ClassLoader is also customized. Just say it! Speak hard! Just take it this way.

There is also the above "JVM shields the details of the operating system and hardware", which means that we need to install jdk on both windows and linux to run Java. In fact, that is to say, no matter which operating system we are in, we can run when we install jdk,Java, which is cross-platform!

There is also the above mentioned "converting bytecode to final machine code through JVM's interpreter". In fact, it is not very accurate. How can I put it? In most cases, Java is executed through interpretation, but common JVM provides a JIT (Just-In-Time) compiler, that is, a dynamic compiler. JIT can compile hot code into machine code at run time, so this part of the code is compiled and executed!

The answer to the question about how to understand the Java platform is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report