Java Web Programming Interview Questions

Question1:

What is a Servlet?

Answer: Servlets are modules of Java code that run in a server application (hence the name "Servlets", similar to "Applets" on the client side) to answer client requests.

Question2:

What advantages does CMOS have over TTL(transitor transitor logic)? (ALCATEL)

Answer:

  • low power dissipation
  • pulls up to rail
  • easy to interface

How is Java unlike C++? (Asked by Sun)

Answer:

Some language features of C++ have been removed. String manipulations in Java do not allow for buffer overflows and other typical attacks. OS-specific calls are not advised, but you can still call native methods. Everything is a class in Java. Everything is compiled to Java bytecode, not executable (although that is possible with compiler tools).

Question4:

What is HTML (Hypertext Markup Language)?

Answer:

HTML (HyperText Markup Language) is the set of "markup" symbols or tags inserted in a file intended for display on a World Wide Web browser. The markup tells the Web browser how to display a Web page’s words and images for the user.

Question5:

Define class.

Answer: A class describes a set of properties (primitives and objects) and behaviors (methods).