πŸ“Š JAVA
Q. What are the components of a marker interface?
  • (A) Fields, no methods
  • (B) No fields, No methods
  • (C) No fields, only methods
  • (D) Fields and methods
πŸ’¬ Discuss
βœ… Correct Answer: (B) No fields, No methods
πŸ“Š JAVA
Q. Which of the following is not a directive in JSP?
  • (A) taglib directive
  • (B) page directive
  • (C) command directive
  • (D) include directive
πŸ’¬ Discuss
βœ… Correct Answer: (C) command directive
πŸ“Š JAVA
Q. Java code is embedded under which tag in JSP?
  • (A) Expression
  • (B) Declaration
  • (C) Scriptlet
  • (D) Comment
πŸ’¬ Discuss
βœ… Correct Answer: (C) Scriptlet
πŸ“Š JAVA
Q. Can and <%–comment–%> be used alternatively in JSP?
  • (A) False
  • (B) True
  • (C) ---
  • (D) ---
πŸ’¬ Discuss
βœ… Correct Answer: (A) False
πŸ“Š JAVA
Q. What temporarily redirects response to the browser?
  • (A) response.setRedirect(URL)
  • (B) <%@directive%>
  • (C) response.sendRedirect(URL)
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) response.sendRedirect(URL)
πŸ“Š JAVA
Q. Which object stores references to the request and response objects?
  • (A) sessionAttribute
  • (B) HttpSession
  • (C) pageContext
  • (D) sessionContext
πŸ’¬ Discuss
βœ… Correct Answer: (C) pageContext
πŸ“Š JAVA
Q. “out” is implicit object of which class?
  • (A) javax.servlet.jsp.JspWriter
  • (B) javax.servlet.jsp.SessionPrinter
  • (C) javax.servlet.jsp.SessionWriter
  • (D) javax.servlet.jsp.PrintWriter
πŸ’¬ Discuss
βœ… Correct Answer: (A) javax.servlet.jsp.JspWriter
πŸ“Š JAVA
Q. Consider the following code snippet.
The code is equivalent to which code?
Code:
for(var n in m)
   console.log(m[n]);
  • (A) for (var i = 1;i < a.length;i++) console.log(a[i]);
  • (B) for (var i = 0;i < a.length;i++) console.log(a[i]);
  • (C) for (int i = 0;i < a.length;i++) console.log(a[i]);
  • (D) for (var i = 0;i <= a.length;i++) console.log(a[i]);
πŸ’¬ Discuss
βœ… Correct Answer: (B) for (var i = 0;i < a.length;i++) console.log(a[i]);
πŸ“Š JAVA
Q. Who is considered as the creator of JAVA ?
  • (A) Dennis Richie
  • (B) Ken Thompson
  • (C) James Gosling
  • (D) Bjarne Stroupstrup
πŸ’¬ Discuss
βœ… Correct Answer: (C) James Gosling
πŸ“Š JAVA
Q. Which of the following statements about the Java language is true?
  • (A) Java supports only Procedural Oriented Programming approach
  • (B) Both Procedural and Object Oriented Programming are supported in Java
  • (C) Java supports only Object Oriented Programming approach
  • (D) None of the Above
πŸ’¬ Discuss
βœ… Correct Answer: (C) Java supports only Object Oriented Programming approach