Java/J2EE Interview Questions - Architect's Diary
Memory
- What is the Java heap, and what is the stack? (Hint: dynamic, program thread execution.)
- Why does garbage collection occur and when can it occur? (Hint: To recover memory, as heap gets full.)
- If I have a circular reference of objects, but I no longer reference any of them from any executing thread, will these cause garbage collection problems? (Hint: no)
Exceptions
- What is the problem or benefits of catching or throwing type "java.lang.Exception"? (Hint: Hides all subsequent exceptions.)
- What is the difference between a runtime exception and a checked exception? (Hint: Must catch or throw checked exceptions.)
JSP
- What is the best practice regarding the use of scriptlets in JSP pages? Why? (Hint: Avoid)How can you avoid scriptlet code? (Hint:custom tags, Java beans)
- What do you understand by the term JSP compilation? (Hint: compiles to servlet code)
Read full article from Java/J2EE Interview Questions - Architect's Diary
No comments:
Post a Comment