Java Web Development: JSP, MVC and Server Operations

Test your knowledge of Java web technologies including JSP lifecycle, MVC architecture patterns, string operations, and WebSphere server administration and logging.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What are the life cycle methods in jsp?

  1. jspInit()
  2. jspservice()
  3. jspDestroy()
  4. All of the above
Question 2 Multiple Choice (Single Answer)

How many types of text formats in jsp?

  1. Static Content
  2. Dynamic content
  3. Both a and b
  4. None of the above
Question 3 Multiple Choice (Single Answer)

How to clear the JVM logs in server?

  1. By sending a mail to websphere_test team
  2. By submitting a work request to WDT team
  3. Either a or b
  4. None of the above
Question 4 Multiple Choice (Single Answer)

Log which helps to see the errors raised only during the particular date and time

  1. EML viewer
  2. Logs in wasops
  3. Both a and b
  4. None of the above
Question 5 Multiple Choice (Single Answer)

In MVC Architecture, the significance of Model is ______.

  1. Business Logic
  2. UI
  3. Control Logic
  4. None of the above
Question 6 Multiple Choice (Single Answer)

MVC architecture is used commonly because

  1. The addition, editing, and removal of interfaces is simple
  2. Changes made to the logic control are easy
  3. Helps developers avoid repeating common code
  4. All of the above
Question 7 True/False

Struts is based on MVC framework

  1. True
  2. False
Question 8 True/False

Boolean values can be cast into any other primitive type.

  1. True
  2. False
Question 9 Multiple Choice (Single Answer)

The logs for the server can be viewed through

  1. EML viewer
  2. Logs in wasops
  3. Both a and b
  4. None of the above
Question 10 Multiple Choice (Single Answer)

What is the output of the following StringBuffer sb1 = new StringBuffer("Amit"); StringBuffer sb2= new StringBuffer("Amit"); String ss1 = "Amit"; System.out.println(sb1==sb2); System.out.println(sb1.equals(sb2)); System.out.println(sb1.equals(ss1)); System.out.println("Poddar".substring(3));

  1. false false false dar
  2. false true false Poddar
  3. Compiler Error
  4. true true false dar
Question 11 True/False

When a string literal is used in the program, Java automatically creates instances of the string class.

  1. True
  2. False
Question 12 Multiple Choice (Single Answer)

Which of the following are primitive types?

  1. byte
  2. String
  3. integer
  4. Float
Question 13 Multiple Choice (Single Answer)

What is the output (Assuming written inside main) String s1 = new String("amit"); String s2 = s1.replace('m','i'); s1.concat("Poddar"); System.out.println(s1); System.out.println((s1+s2).charAt(5));

  1. Compile error
  2. amitPoddar O
  3. amitPoddar I
  4. amit I
Question 14 Multiple Choice (Single Answer)

What is the output of following (Assuming written inside main) String s1 = "Amit"; String s2 = "Amit"; String s3 = new String("abcd"); String s4 = new String("abcd"); System.out.println(s1.equals(s2)); System.out.println((s1==s2)); System.out.println(s3.equals(s4)); System.out.println((s3==s4));

  1. True true true false
  2. True true true true
  3. True false true false
  4. False false true false
Question 15 Multiple Choice (Single Answer)

How to clear the JVM logs in server?

  1. By sending a mail to websphere_test team
  2. By submitting a work request to WDT team
  3. Either a or b
  4. None of the above
Question 16 Multiple Choice (Single Answer)

Log which helps to see the errors raised only during the particular date and time

  1. EML viewer
  2. Logs in wasops
  3. Both a and b
  4. None of the above
Question 17 Multiple Choice (Single Answer)

In MVC Architecture, the significance of Model is ______.

  1. Business Logic
  2. UI
  3. Control Logic
  4. None of the above
Question 18 Multiple Choice (Single Answer)

MVC architecture is used commonly because

  1. The addition, editing, and removal of interfaces is simple
  2. Changes made to the logic control are easy
  3. Helps developers avoid repeating common code
  4. All of the above
Question 19 Multiple Choice (Single Answer)

The logs for the server can be viewed through

  1. EML viewer
  2. Logs in wasops
  3. Both a and b
  4. None of the above
Question 20 Multiple Choice (Single Answer)

What is the output of the following StringBuffer sb1 = new StringBuffer("Amit"); StringBuffer sb2= new StringBuffer("Amit"); String ss1 = "Amit"; System.out.println(sb1==sb2); System.out.println(sb1.equals(sb2)); System.out.println(sb1.equals(ss1)); System.out.println("Poddar".substring(3));

  1. false false false dar
  2. false true false Poddar
  3. Compiler Error
  4. true true false dar