Java Interview Questions
8 Apr, 2007
- What is RMI architecture?- RMI architecture consists of four layers and each layer performs specific functions: a) Application layer - contains the actual object definition. b) Proxy layer - consists of stub and skeleton. c) Remote Reference layer - gets the stream of bytes from the transport layer and sends it to the proxy layer. d) Transportation layer - responsible for handling the actual machine-to-machine communication.
- what is UnicastRemoteObject?- All remote objects must extend UnicastRemoteObject, which provides functionality that is needed to make objects available from remote machines.
8 Apr, 2007
- What are JSP ACTIONS?- JSP actions use constructs in XML syntax to control the behavior of the servlet engine. You can dynamically insert a file, reuse JavaBeans components, forward the user to another page, or generate HTML for the Java plugin. Available actions include: jsp:include - Include a file at the time the page is requested. jsp:useBean - Find or instantiate a JavaBean. jsp:setProperty - Set the property of a JavaBean. jsp:getProperty - Insert the property of a JavaBean into the output. jsp:forward - Forward the requester to a newpage. Jsp: plugin - Generate browser-specific code that makes an OBJECT or EMBED
8 Apr, 2007
- Meaning - Abstract classes, abstract methods
- Difference - Java,C++
- Difference between == and equals method
- Explain Java security model
- Explain working of Java Virtual Machine (JVM)
- Difference: Java Beans, Servlets
- Difference: AWT, Swing
- Disadvantages of Java
- What is BYTE Code ?
- What gives java it’s “write once and run anywhere” nature?
- Does Java have “goto”?
- What is the meaning of “final” keyword?
- Can I create final executable from Java?
- Explain Garbage collection mechanism in Java
- Why Java is not 100% pure object oriented language?
8 Apr, 2007
- If Runnable interface is better than Thread class, than why we are using Thread class? What is the need for Thread class?
- Why we are calling System.gc() method to garbage collection of unused object, if garbage collection is automatically done in Java by daemon thread in background process with regular interval?
- What is the significance of Marker interface? Why are we using, even though it has no method?
- Why we are always doing rs.next() in first line of while loop in retrieving data from database through result set?
8 Apr, 2007
- What is the servlet?
- What are the JSP atrributes?
- What is the need of super.init(config) in servlets?
- How to know whether we have to use jsp or servlet in our project?
- Can we call destroy() method on servlets from service method?
- What is the Servlet Interface?
- What is the difference between GenericServlet and HttpServlet?
- How we can check in particular page the session will be alive or not?
- What is the importance of deployment descriptor in servlet?
- When we increase the buffer size in our project using page directive attribute ‘buffer’ what changes we observe?