|
| 1 | +------------------------------------------------------------------------------------------ |
| 2 | +JVM Internals |
| 3 | +------------------------------------------------------------------------------------------ |
| 4 | + |
| 5 | +Questions taken from |
| 6 | + |
| 7 | +http://www.roseindia.net/java/java-virtual-machine.shtml |
| 8 | +http://www.interviewjava.com/2007/04/inside-java-virtual-machine.html |
| 9 | +http://www.javabeat.net/2010/08/jvmjrejava-compiler-interview-questions/2/ |
| 10 | + |
| 11 | +Answers taken from |
| 12 | + |
| 13 | +http://www.artima.com/insidejvm/ed2/jvm.html |
| 14 | + |
| 15 | +------------------------------------------------------------------------------------------ |
| 16 | + |
| 17 | +1. What is Java Virtual Machine? |
| 18 | +2. Memory Management with JVM ? |
| 19 | +3. Explain the Difference amongst JVM Specification, JVM Implementation, JVM Runtime. |
| 20 | +4. Why is the source file named after the class? |
| 21 | +5. Which class should be compiled first? |
| 22 | +6. What are the steps in compiling a class? |
| 23 | +7. Where is my compiled class file? |
| 24 | +8. How can I ensure my compiler will locate the SAX package? |
| 25 | +9. What are undefined and undeclared variables? |
| 26 | +10. Why doesn’t the compiler warn about stack overflow problems? |
| 27 | +11. What is a Java Virtual Machine (JVM)? |
| 28 | +12. What does a JVM consist of? |
| 29 | +13. What is a class loader and what is its responsibilities? |
| 30 | +14. What is heap and stack? |
| 31 | +15. How is your Java program executed inside JVM? |
| 32 | +16. What is Java class file's magic number? |
| 33 | +17. How JVM performs Thread Synchronization? |
| 34 | +18. If your program is I/O bound or running in native methods, do these activities engage JVM? |
| 35 | +19. What is the difference between interpreted code and compiled code? |
| 36 | +20. Why Java based GUI intensive program has performance issues? |
| 37 | +21. What is 64 bit Java ? |
| 38 | +22. What is the difference between JVM and JRE? |
| 39 | +23. Explain the processes performed by java virtual machine, i.e. loading, linking, initialization. |
| 40 | +24. What is javap? |
| 41 | +25. Explain the purpose of garbage collection that the JVM uses |
| 42 | +26. How JVM performs Garbage Collection? |
| 43 | +27. How to profile heap usage? |
| 44 | + Use jconsole, hprof, jstat for example. |
| 45 | +28. What will you do if VM exits while printing "OutOfMemoryError" and increasing max heap size doesn't help? |
| 46 | + Same as above |
| 47 | +29. Should one pool objects to help Garbage Collector? Should one call System.gc() periodically? |
| 48 | + No. |
| 49 | +30. An application has a lot of threads and is running out of memory, why? |
| 50 | +31. Types of GC |
| 51 | +32. Generations of heap space |
0 commit comments