805 OCPJP 6 Questions 788 SCJP 5 questions 650 OCPJWCD 5 questions 600 OCAJP 7 questions 610 OCPJP 7 questions 510 Upgrade to OCPJP 7 questions 900 Java J2EE Qns

Mock Questions

  scjp 1.5

  • Declarations, Initialization & Scoping
  • Method overriding or overloading
  • Inner Classes
  • Flow Control
  • Type Safe Enum
  • Enhanced for loop
  • Assertions
  • Exception
  • API Contents autoboxing & unboxing
  • File
  • Serializable
  • java.text and Locale
  • Regular Expression
  • Collections and Generics
  • Thread and Concurrency

  •   scjp 1.6

  • Declarations, Initialization & Scoping
  • Method overriding or overloading
  • Inner Classes
  • Flow Control
  • Type Safe Enum
  • Enhanced for loop
  • Assertions
  • Exception
  • API Contents autoboxing & unboxing
  • File
  • Serializable
  • java.text and Locale
  • Regular Expression
  • Collections and Generics
  • Thread and Concurrency
  • NavigableMap
  • NavigableSet
  • java.io.Console

  •   scwcd 1.5

  • Servlet Basic
  • The Structure and Deployment of Web Applications
  • The Web Container Model
  • Servlet event listeners
  • Session Management,session listeners
  • Servlet Filter
  • Web Application Security
  • j2ee patterns
  • JSP Directives
  • JSP page life cycle
  • JSP implicit objects
  • JSP include
  • Expression Language (EL)
  • JSTL
  • Building a Custom Tag Library
  • SCWCD : Building JSP Pages Using the Expression Language (EL) Mock Exam Practice Questions

    Questions no -1 
    
    If the servlet code
    
    public class testServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    request.setAttribute("attribute1", "attribute1");
    HttpSession session = request.getSession();
    session.setAttribute("attribute2", "attribute2");
    ServletContext application = getServletContext();
    application.setAttribute("attribute3","attribute3");
    RequestDispatcher dispatcher =
    request.getRequestDispatcher("/test.jsp");
    dispatcher.forward(request, response);
    }
    }
    
    and in the test.jsp 
    
    attribute1: ${attribute1}
    attribute2: ${attribute2}
    attribute3: ${attribute3}
    
    What is the value of attribute1, attribute2, attribute3 ?
    
    
    options A)attribute1: attribute1 attribute2: attribute2 attribute3: attribute3 B)attribute1: attribute1 attribute2: null attribute3: null C)attribute1: null attribute2: null attribute3: attribute3 D)attribute1: attribute1 attribute2: null attribute3: attribute3 Correct answer is : A Explanations : ${attribute1} is same as pageContext.findAttribute("attribute1"). pageContext.findAttribute() find in request then session then application scope.
    Questions no -2 
    
    If in test.jsp
    
    \${3+2-1} : ${3+2-1}
    
    What is the output?
    
    
    options A)\${3+2-1} : 4 B)\$4 : 4 C)4 : 4 D)\4 : 4 Correct answer is : A Explanations : adding \ before EL , does not execute the EL. \${3+2-1} : ${3+2-1} value is \${3+2-1} : 4
    scjp 1.5 | scjp 1.6 | scwcd 1.5
    Java Certifications
    www.javacertifications.net