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.
Questions
What are the life cycle methods in jsp?
- jspInit()
- jspservice()
- jspDestroy()
- All of the above
How many types of text formats in jsp?
- Static Content
- Dynamic content
- Both a and b
- None of the above
How to clear the JVM logs in server?
- By sending a mail to websphere_test team
- By submitting a work request to WDT team
- Either a or b
- None of the above
Log which helps to see the errors raised only during the particular date and time
- EML viewer
- Logs in wasops
- Both a and b
- None of the above
In MVC Architecture, the significance of Model is ______.
- Business Logic
- UI
- Control Logic
- None of the above
MVC architecture is used commonly because
- The addition, editing, and removal of interfaces is simple
- Changes made to the logic control are easy
- Helps developers avoid repeating common code
- All of the above
Struts is based on MVC framework
- True
- False
Boolean values can be cast into any other primitive type.
- True
- False
The logs for the server can be viewed through
- EML viewer
- Logs in wasops
- Both a and b
- None of the above
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));
- false false false dar
- false true false Poddar
- Compiler Error
- true true false dar
When a string literal is used in the program, Java automatically creates instances of the string class.
- True
- False
Which of the following are primitive types?
- byte
- String
- integer
- Float
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));
- Compile error
- amitPoddar O
- amitPoddar I
- amit I
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));
- True true true false
- True true true true
- True false true false
- False false true false
How to clear the JVM logs in server?
- By sending a mail to websphere_test team
- By submitting a work request to WDT team
- Either a or b
- None of the above
Log which helps to see the errors raised only during the particular date and time
- EML viewer
- Logs in wasops
- Both a and b
- None of the above
In MVC Architecture, the significance of Model is ______.
- Business Logic
- UI
- Control Logic
- None of the above
MVC architecture is used commonly because
- The addition, editing, and removal of interfaces is simple
- Changes made to the logic control are easy
- Helps developers avoid repeating common code
- All of the above
The logs for the server can be viewed through
- EML viewer
- Logs in wasops
- Both a and b
- None of the above
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));
- false false false dar
- false true false Poddar
- Compiler Error
- true true false dar