Programming Interview Questions For Software Testers

Advance Programming Interview Questions
Object Oriented Development
  • What is inheritance?
  • What is polymorphism (also called dynamic binding)?
  • What is encapsulation?
    Java General Language Questions
    1. What is an interface?
      Answer: A special, completely abstract class (no implementation or attributes).
    2. What is an inner class? Example of use?
      Answer: One class defined (coded) within the body of another.
    3. Does Java support multiple inheritance?
      Answer: Technically, no. But you can simulate something close by using interfaces.
    4. What does a final data; final method; final class mean?
      Answer: Final data: data becomes a compile-time constant
      Answer: Final method: an inherited class cannot override the method
      Answer: Final class: you cannot inherit from this class.
      • Servlets Questions
    5. Define "servlet"
      Answer: A piece of code that runs on a server.
      Answer: HTTPServlet returns HTML code
    6. Any multithreading issues with servlets?
      Answer: Yes. A server will use a pool of threads to run the servlets. Therefore, the servlet must be threadsafe.
      • Threading Questions
    7. How do you make a servlet threadsafe:
      Answer: Synchronize all calls to any shared data.
      • JSPs Questions
    8. What is a JSP?
      Answer: Stands for Java Server Page
      Answer: A page that contains HTML and Java code within.
      RMI Questions
    9. What is the Remote Interface?
      Answer: It is the reference to the interface that links to some stub code that will call the remote object on the remote machine. It "feels" like a regular object, but is, in fact, an interface to the remote object.
    10. What steps must the implementation of the remote interface do?
      Answer: Create the RMISecurity manager class
      Answer: Create one or more instances of the remote class
      Answer: Register at least one instance of the remote class with the registry
    11. What function does the RMIREGISTRY serve?
      Answer: Tells the caller where to find an instance of the requested class.
    12. What does the rmic tool do?
      Answer: Creates the stubs and skeletons
    13. What are the stubs and skeletons used for?
      • CORBA Questions
    14. What is the difference between RMI and CORBA?
      Answer: RMI is Java only while CORBA allows the use of objects written in different languages.
      • EJB Questions
    15. What are the following components:
      • Container
      Answer: The service provided by an application server vendor in which your EJBs will run.
      • Java Naming and Directory Interface (JNDI)
      Answer:The equivalent of a naming service that allows client applications to find an instance of an EJB
      • Java Transaction API/Service (JTA/JTS)
      Answer: Let’s the container manage the transactionality of an EJB
    16. What are the following pieces of an EJB component:
      • Enterprise bean
      Answer: This is the actual implementation of a bean that will run within a container
      • Home interface
      Answer: Used to create an instance of an EJB (or find an instance already created)
      • Remote interface
      Answer: Defines the public methods that your EJB will support
      • Deployment Descriptor
      Answer: An XML file containing the configuration information (such as the names of the Home and Remote interfaces, the name published in JNDI, the transactional attributes, and any ACL information) for your EJB.
    17. What is a stateless session bean?
      Answer: EJB that do not save any state information within itself and is mapped to a client.
    18. What is an Entity bean?
      Answer: Maintain persistent data
      Answer: Shared among clients.
    19. What is Container Managed Persistence?
      Answer: The container is responsible for managing the persistence of the entity bean
    20. What is Bean Managed Persistence?
      Answer: The bean itself is responsible for managing its own persistence.

    Database Theory
    question: Explain the concept of a transaction?
    Answer: Transaction begins with the valid SQL statement. Transaction begins when you connect to the database. It ends after commit or rollback.
    question: What is a two-phase commit?
    question: How would you implement a many-to-many relationship in a database?
    Answer: Should produce a mapping table between the two tables
    question: Draw an inheritance relationship in UML.
    question: What is a sequence diagram used for? sequence diagram shows the time based dynamics of the interaction.
    question: What is an activity diagram used for? - activity diagram describes activities that occur within use case in the sequence.
    question: What is a DTD?
    Answer: Defines the correct format of a well-formed XML document.
    question: What is the difference between a SAX parser and a DOM parser?
    Answer: SAX does an in-line parse of the file (ie: it calls the appropriate code as it hits the tag.
    Answer: DOM creates an object model of the XML document that can then be worked with.
    question: What is public, private, protected?
    question: What is static typing?
    Answer: Type safety at compile time
    question: What is dynamic typing?
    Answer: Type safety at runtime
    question: What is a friend class?
    Answer: Friends can see your private parts
    question: What is operator overloading?
    Answer: Redefine a C++ operator
    question: Should local variables be declared at the top of a function of near Ist usage?
    Answer: Near 1st use for performance and readability
    question: Leading cause of bugs?
    question: What are templates?
    Answer: Allow sharing of code among structurally similar families of classes/functions.
    question: What are containers?
    Answer: An object that holds other objects.

    On this page I put some Advance Programming Interview Questions. These Advance Programming Interview Questions are not very simplefor testers and mainly were used for interviewing software testers who is involved in advance grey box testing and automation. The interview questions found above are listed in order of complexity. However all new interview questions (regardless of there difficulty) will be added to the bottom of the list. You can find more Programming Interview Questions searching the WEB.
    END Programming Interview Questions

    Interview Questions QA Main Page
    © January 2006 Alex Samurin and © 2009