0% found this document useful (0 votes)
696 views

m4 MCQ

The document contains various topics related to Java servlets, JSP, and core Java concepts like inheritance, interfaces, and keywords. The topics are covered at different levels including knowledge, comprehension, and application. The document appears to be notes from courses or learning materials on these Java web and core programming topics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
696 views

m4 MCQ

The document contains various topics related to Java servlets, JSP, and core Java concepts like inheritance, interfaces, and keywords. The topics are covered at different levels including knowledge, comprehension, and application. The document appears to be notes from courses or learning materials on these Java web and core programming topics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 401

SubBank

Servlets - Session Management-Application

Servlets - Session Management-Application

Servlets - Session Management-Application

Servlets - Session Management-Application


Servlets - Session Management-Application

Servlets - Session Management-Application

Servlets - Session Management-Application

Servlets - Session Management-Application

Servlets - Session Management-Application

Servlets - Introduction and Chaining-Application


Servlets - Introduction and Chaining-Application

Servlets - Introduction and Chaining-Application


Servlets - Introduction and Chaining-Application

Servlets - Introduction and Chaining-Application

Servlets - Introduction and Chaining-Application

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge


Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge


Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge


Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge


Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge


Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Introduction and Chaining-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge


Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge


Servlets - Session Management-Knowledge

Servlets - Session Management-Knowledge

Servlets - Listeners-Knowledge

Servlets - Listeners-Knowledge

Servlets - Listeners-Knowledge

Servlets - Listeners-Knowledge

Servlets - Listeners-Knowledge

Servlets - Listeners-Knowledge
JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension


JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - EL (Expression Language)-Comprehension

JSP - Custom Tags-Knowledge


JSP - Custom Tags-Knowledge

JSP - Custom Tags-Knowledge

JSP - Custom Tags-Knowledge

JSP - JSTL-Knowledge

JSP - JSTL-Knowledge

JSP - JSTL-Knowledge
JSP - JSTL-Knowledge

JSP - JSTL-Knowledge

JSP - JSTL-Knowledge

JSP - JSTL-Knowledge

JSP - Beans & Action-Application


JSP - Beans & Action-Application

JSP - Beans & Action-Application

JSP - Beans & Action-Application


JSP - Beans & Action-Application

JSP - Beans & Action-Application

JSP - Beans & Action-Application


JSP - Beans & Action-Application

JSP - Beans & Action-Application

JSP - Beans & Action-Application


JSP - Beans & Action-Application

JSP - Beans & Action-Application

JSP - Beans & Action-Application

JSP - Beans & Action-Application


JSP - Beans & Action-Application

JSP - Implicit Objects & Forms-Knowledge

JSP - Implicit Objects & Forms-Knowledge

JSP - Implicit Objects & Forms-Knowledge

JSP - Elements-Application

JSP - Elements-Application

JSP - Elements-Application
JSP - Elements-Application

JSP - Elements-Application

JSP - Elements-Application

JSP - Elements-Application

JSP - Elements-Application

JSP - Elements-Application

JSP - Directives-Application

JSP - Directives-Application

JSP - Directives-Application
JSP - Directives-Application

JSP - Directives-Application

JSP - Directives-Application

Servlets - Context Config-Knowledge

Servlets - Context Config-Knowledge

Servlets - Context Config-Knowledge

Servlets - Context Config-Knowledge

Servlets - Context Config-Knowledge

Servlets - Context Config-Knowledge

Servlets - Context Config-Knowledge


Servlets - Context Config-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge
JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge
JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge
JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

JSP - Basics-Knowledge

Servlets - Filtering-Application

Servlets - Filtering-Application
Servlets - Filtering-Application

Servlets - Filtering-Application

JSP - Custom Tags-Application

JSP - Custom Tags-Application

JSP - Custom Tags-Application

Servlets - Filtering-Knowledge

Servlets - Filtering-Knowledge

Servlets - Filtering-Knowledge
CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods
CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods
CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods
CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Access Specifiers_Constructors_Methods

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-


CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Inheritance, Interfaces & Abstract Classes-

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes
CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes
CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Keywords_Variables_Operators_Datatypes

CoreJava-Threads-Knowledge
CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge
CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge
CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge
CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge

CoreJava-Threads-Knowledge

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi


CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi


CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Comprehensi

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application


CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application


CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application

CoreJava-Collections and util package-Application


CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C


CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C

CoreJava-Strings, String Buffer and its functions-C


CoreJava-Strings, String Buffer and its functions-C

CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application
CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application
CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application
CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application
CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application
CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Application

CoreJava-Exception Handling-Comprehension
CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension
CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension
CoreJava-Exception Handling-Comprehension

CoreJava-Exception Handling-Comprehension

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge


CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge


CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-I/O Operations in Java-Knowledge

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto


CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto


CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto


CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-Control Structures_Wrapper classes_Auto

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge
CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge
CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge

CoreJava-JDBC-Knowledge
CoreJava-JDBC-Knowledge

Oracle-SQL Expressions/SQL Function/SQL Operators

Oracle-SQL Expressions/SQL Function/SQL Operators

Oracle-SQL Expressions/SQL Function/SQL Operators

Oracle-SQL Expressions/SQL Function/SQL Operators

Oracle-SQL Expressions/SQL Function/SQL Operators


Oracle-SQL Expressions/SQL Function/SQL Operators

Oracle-SQL Expressions/SQL Function/SQL Operators

Oracle-SQL Expressions/SQL Function/SQL Operators

Oracle-SQL Expressions/SQL Function/SQL Operators

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati


Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati


Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati


Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Query Flashback & Schema Objects-Applicati

Oracle-Joins and Subquery-Knowledge

Oracle-Joins and Subquery-Knowledge

Oracle-Joins and Subquery-Knowledge


Oracle-Joins and Subquery-Knowledge

Oracle-Joins and Subquery-Knowledge

Oracle-Joins and Subquery-Knowledge

Oracle-Joins and Subquery-Knowledge

Oracle-Joins and Subquery-Knowledge

Oracle-Joins and Subquery-Knowledge


Oracle-Joins and Subquery-Knowledge

Oracle-Joins and Subquery-Knowledge

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension
Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension
Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension
Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension
Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension
Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension
Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension
Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension
Oracle-Fundamental of PL/SQL-Comprehension

Oracle-Fundamental of PL/SQL-Comprehension

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled


Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled


Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled


Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled


Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled


Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-PL/SQL Subprograms and Triggers-Knowled

Oracle-Cursors and PL/SQL Error handling-Applicati


Oracle-Cursors and PL/SQL Error handling-Applicati

Oracle-Cursors and PL/SQL Error handling-Applicati

Oracle-Cursors and PL/SQL Error handling-Applicati

Oracle-Cursors and PL/SQL Error handling-Applicati


Oracle-Cursors and PL/SQL Error handling-Applicati

Oracle-Cursors and PL/SQL Error handling-Applicati


Oracle-Cursors and PL/SQL Error handling-Applicati
Oracle-Cursors and PL/SQL Error handling-Applicati
Oracle-Cursors and PL/SQL Error handling-Applicati
Oracle-Cursors and PL/SQL Error handling-Applicati

Oracle-Cursors and PL/SQL Error handling-Applicati


Oracle-Cursors and PL/SQL Error handling-Applicati

Oracle-Cursors and PL/SQL Error handling-Applicati


Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp


Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp


Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp


Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp

Oracle-PL/SQL Collection,Record and Varrays-Comp

HTML - Fundamentals-Knowledge

HTML - Fundamentals-Knowledge

HTML - Fundamentals-Knowledge
HTML - Fundamentals-Knowledge

HTML - Tables & Frames-Knowledge

HTML - Tables & Frames-Knowledge

HTML - Tables & Frames-Knowledge

HTML - Meta Tag-Knowledge

HTML - Meta Tag-Knowledge

HTML - Meta Tag-Knowledge

HTML - Meta Tag-Knowledge

HTML - Form Control-Application

HTML - Form Control-Application

HTML - Form Control-Application


HTML - Div Span-Comprehension

HTML - Div Span-Comprehension

HTML - Div Span-Comprehension

HTML - Div Span-Comprehension

Javascript - Basics-Knowledge

Javascript - Basics-Knowledge

Javascript - Basics-Knowledge

Javascript - Basics-Knowledge

Javascript - Basics-Knowledge
Javascript - Objects & Events-Application

Javascript - Objects & Events-Application

Javascript - Objects & Events-Application

Javascript - Objects & Events-Application

XML- Introduction to XML-Knowledge

XML- Introduction to XML-Knowledge

XML- Introduction to XML-Knowledge

XML- Introduction to XML-Knowledge


XML- Introduction to XML-Knowledge

XML- Introduction to XML-Knowledge

XML- Introduction to XML-Knowledge

XML- Introduction to XML Parsers-Knowledge

XML- Introduction to XML Parsers-Knowledge

XML- Introduction to XML Parsers-Knowledge

XML- Introduction to XML Parsers-Knowledge

XML- Introduction to XML Parsers-Knowledge

XML- Introduction to JAXP-Knowledge

XML- Introduction to JAXP-Knowledge


XML- Introduction to JAXP-Knowledge

XML- Introduction to JAXP-Knowledge

XML- Introduction to JAXP-Knowledge

XML- Introduction to JAXP-Knowledge

XML- Introduction to JAXP-Knowledge

XML- Introduction to JAXP-Knowledge

XML- Introduction to XML Schema-Application


XML- Introduction to XML Schema-Application

XML- Introduction to XML Schema-Application

Industry Practices-Coding Standards in Java-Knowle

Industry Practices-Coding Standards in Java-Knowle


Industry Practices-Coding Standards in Java-Knowle

Industry Practices-Coding Standards in Java-Knowle

Industry Practices-Coding Standards in Java-Knowle

Industry Practices-Coding Standards in Java-Knowle

Industry Practices-Coding Standards in Java-Knowle

Industry Practices-Coding Standards in Java-Knowle

Industry Practices-Coding Standards in Java-Knowle


Industry Practices-Coding Standards in Java-Knowle

Industry Practices- Refactoring-Knowledge

Industry Practices- Refactoring-Knowledge

Industry Practices- Refactoring-Knowledge

Industry Practices- Refactoring-Knowledge

Industry Practices-SCM-Knowledge

Industry Practices-SCM-Knowledge

CoreJava-Scenario (application) based questions-App


CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App


CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App


CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App


CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

CoreJava-Scenario (application) based questions-App

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic
Oracle-Scenario (Application) based questions-Applic
Oracle-Scenario (Application) based questions-Applic
Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic
Oracle-Scenario (Application) based questions-Applic
Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic

Oracle-Scenario (Application) based questions-Applic


J2EE Design Patterns

J2EE Design Patterns

J2EE Design Patterns

J2EE Design Patterns

J2EE Design Patterns

J2EE Design Patterns

J2EE Design Patterns


J2EE Design Patterns

J2EE Design Patterns

J2EE Design Patterns

J2EE Design Patterns

J2EE Design Patterns


J2EE Design Patterns

J2EE Design Patterns

J2EE Design Patterns


J2EE Design Patterns
QuestionText Choice1 Choice2 Choice3 Choice4

Carefully read the question and answer accordingly.


Which two of the following statements correctly store an object
associated with a name at a place where all the servlets/JSPs
of the same webapp participating in a session can use it?
(Assume that request, response, name, value etc. are
references to objects of appropriate types.)
1.response.setAttribute(name, value)
2.getServletContext().setAttribute(name, value)
3.request.setAttribute(name, value)
4.request.getSession().setAttribute(name, value)
5.request.setParameter(name, value) 1&2 1&3 2&3 2&4

Carefully read the question and answer accordingly.


Consider the following servlet code segment:
HttpSession session = request.getSession(true); Depends
session.setAttribute(“name”, “Cognizant”); on
session.invalidate(0); whether
if (session.isNew()) the
{ System.out.println(session.getAttribute(“name”); session is
} else { System.out.println(session.isNew()); Displays Displays newly
} “Cognizant” “false” Throws created or
What is the output of the above code segment ? always always exception not

Carefully read the question and answer accordingly.


Consider the following code for an HTML form.
<form action=”/servlet/Login”>
<input type=”text” name=”username” value=”enter username”/>
<input type=”submit” name=”sbbutton” value=”signin!..”/>
</form>
Which of the following happens upon pressing the submit
button in the above form?
1.A request is sent with the HTTP method GET.
2.A request is sent with the HTTP method POST.
3.The parameter username is the only parameter passed to
the web server in the request.
4.The parameters username and sbbutton are passed to the
web server in the request URL. 1&2 1&3 2&3 2&4

Carefully read the question and answer accordingly. Compilati


Consider the following code snippet: on and
ServletContext sc = this.getServletContext(); output of
RequestDispatcher dis = the
sc.getRequestDispatcher("/menu.jsp"); contents
if (dis != null){ of Compilati
dis.include(request, response); menu.jsp on, but
} Compilation followed runtime
PrintWriter out = response.getWriter(); and output of by error, the
out.print("Output after menu.jsp"); the contents "Output buffer has
Which one of the following will be the correct outcome when of menu.jsp after Compilati been
the above lines are executed? only menu.jsp" on error flushed
By setting By setting
the the
session- setMaxIn
timeout activeInte
parameter rval()
in the method By using
Carefully read the question and answer accordingly. By using the web.xml period to the
Which of the following options can be used by the controller to invalidate() file to 1 60 destroy()
destroy a session of a web application immediately? method minute seconds method

Carefully read the question and answer accordingly. HttpSessi


Given an HttpServletRequest request: HttpSessi on
22. String id = request.getParameter("jsessionid"); on session =
23. // insert code here HttpSession session = request.g
24. String name = (String) session.getAttribute("name"); session = request.g etSession None of
Which statement can be placed at line 23 to retrieve an request.getSe etSession ("jsessioni the listed
existing HttpSession object? ssion(id); (true); d"); options

Carefully read the question and answer accordingly.


Consider the following deployment descriptor(web.xml)file:
<session-config>
<session-timeout>
30
</session-timeout>
</session-config> Gives
Then, in the Servlet program code setMaxInactiveInterval(600) illegalStat None of
(seconds) for the session object is invoked. After how long 10 eExceptio the listed
would session expire? Select one answer from the following. 30 minutes minutes n options
Carefully read the question and answer accordingly.
Which of the following is the deployment descriptor file of a
web application? Assuming that the name of the Web WebApp. deployme
application is BankApp. BankApp.xml xml nt.xml web.xml

HttpServl
HttpSessi etRequest
on session =
HttpSession session = request.g
Carefully read the question and answer accordingly. session = request.g etSession
Martin has created a Web application in which a servlet stores request.getSe etSession (); String
a JDBC URL as an attribute of the session object to access a ssion(); String (); String String url url
database. He wants other servlets of the application to retrieve url url =(String)s =(String)s
the URL attribute from the session object to access the =(String)sessi =session. ession.get ession.get
database. Which of the following code snippets can Martin use on.getAttribut getAttribut Session(" Attribute("
to retrieve the URL from the session object? e("URL"); e("URL"); URL"); URL");

Carefully read the question and answer accordingly.


Consider the following statements: Statement Statement Statement
Statement A: GenericServlet is an abstract class Statement A A is true A is false A is false
Statement B: GenericServlet internally implements Servlet is true and and and and
interface statement B statement statement statement
Which of the following is true about these statements? is true. B is false. B is true. B is false.
Carefully read the question and answer accordingly. By
You being a software developer needs to develop a web By overriding By
application for your organization. You decided to use servlets overriding the overriding
to create the web application. While you are creating the the init destroy the doGet
servlet you feel the need to write the code for the initialization By overriding method in method in method in
of the servlet. This is needed to initialize the servlet with the the service the the the
required data after the servlet instance has been created. How method in the servlet servlet servlet
will you perform this task? servlet class. class. class. class.

Carefully read the question and answer accordingly.


Manoj has created the Hello servlet that displays Welcome in
the browser window. The code of the servlet is:
package myworld;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet; <servlet> <servlet> <servlet>
import javax.servlet.http.HttpServletRequest; <servlet- <servlet- <servlet-
import javax.servlet.http.HttpServletResponse; name>hel name>my name>hel
public class hello extends HttpServlet lo</servlet world.hell lo</servlet
{ <servlet> -name> o</servlet -name>
protected void doGet(HttpServletRequest request <servlet- <servlet- -name> <servlet-
HttpServletResponse response) throws ServletException name>hello</ class>my <servlet- class>my
IOException servlet- world.hell class>hell world.hell
{ name> o</servlet o</servlet o</servlet
PrintWriter out = response.getWriter(); <servlet- -class> -class> -class>
out.println("<html>"); class>hello</ </servlet> </servlet> </servlet>
out.println("<head>"); servlet-class> <servlet- <servlet- <servlet-
out.println("<title>My Servlet</title>"); </servlet> mapping> mapping> mapping>
out.println("</head>"); <servlet- <servlet- <servlet- <servlet-
out.println("<body>"); mapping> name>hel name>hel name>hel
out.println("<h>WELCOME</h>"); <servlet- lo</servlet lo</servlet lo</servlet
out.println("</body>"); name>hello</ -name> -name> -name>
out.println("</html>"); servlet- <url- <url- <url-
out.close(); name> <url- pattern>/h pattern>/h pattern>h
} pattern>/hello ello</url- ello</url- ello</url-
} </url-pattern> pattern> pattern> pattern>
Which of the following code snippets correctly defines the </servlet- </servlet- </servlet- </servlet-
deployment descriptor for the preceding servlet? mapping> mapping> mapping> mapping>
<HTML>
<BODY> <HTML>
<FORM <BODY>
ACTION= <FORM
http://local ACTION=
host:8080 http://local
<HTML> /servlet/m host:8080
<BODY> yservlet /servlet
<FORM METHOD <HTML> METHOD
ACTION=http =GET> <BODY> =GET>
://localhost:80 <INPUT <INPUT <INPUT
80/servlet/my TYPE=SU TYPE=SU TYPE=SU
servlet BMIT BMIT BMIT
Carefully read the question and answer accordingly. METHOD=G VALUE=S VALUE=S VALUE=S
Which of the following codes will allow the user to load the ET> UBMIT> UBMIT> UBMIT>
servlet using form. The form should first display submit button </FORM> </FORM> </FORM> </FORM>
and when the user clicks on submit button it should load the </BODY> </BODY> </BODY> </BODY>
servlet called myservlet? </HTML> </HTML> </HTML> </HTML>

RequestD
ispatcher RequestD
dispatche ispatcher
RequestDisp r= dispatche
atcher request.g r =
dispatcher = etRequest request.g
request.getR Dispatche etRequest
equestDispat r("Servlet Dispatche
cher("Servlet 2"); r("Servlet
2"); dispatche 2"); request.s
dispatcher.for r.dispatch dispatche endRedir
Carefully read the question and answer accordingly. ward(req, (req, r.chain(re ect("Servl
Select the code to chain a servlet with another servlet resp); resp); q, resp); et2");

By storing
the By storing By storing
Carefully read the question and answer accordingly. content the the
Mahesh has observed that some users are able to directly files content content
access the content files stored in the Web application from the By storing the under the files files
Web browser. Which of the following options should Mahesh content files META- under the under the
use to prevent the users from directly accessing the content under the dist INF WEB-INF INF
files? directory directory directory directory
Carefully read the question and answer accordingly.
Which of the following is an interface that gets data from the ServletReque ServletRe PrintStrea ServletCo
client and sends it to the servlet? st sponse m nfig
Carefully read the question and answer accordingly.
Whenever a request goes from the client to the server some
additional information other than the request is also passed to
the server. This additional information is in the form of a Applicatio Session
____________. footer header n ID ID
Based on
rules set,
One of the
the key firewall
Firewall tasks of server will
server mainly firewall is A Proxy filter the
focusses on routing server incoming
network between can be a requests
Carefully read the question and answer accordingly. security within a cluster firewall over
Which of the following is / are true about a firewall server? a LAN of servers server internet
Carefully read the question and answer accordingly.
HTTP cannot save state information between one request and
other TRUE FALSE

Carefully read the question and answer accordingly.


If the application is associated with JDK, it will lead to lighter
memory footprint compared associating the application to JRE TRUE FALSE

Carefully read the question and answer accordingly.


Consider the following statements:
Statement A: Modules of Java code run in a server application Statement Statement Statement
is called Applet Statement A A is true A is false A is false
Statement B: Modules of Java code run at client side is called is true and and and and
Servlet statement B statement statement statement
Which of the following is true about these statements? is true. B is false. B is true. B is false.
Carefully read the question and answer accordingly.
Which method can be used to submit form data that should not REQUES
be exposed for viewing? PUT GET POST T

Each
Servlets Servlets request in
are robust only servlet
Servlets are and contains runs in
Carefully read the question and answer accordingly. Platform object business separate
Which of the following is NOT TRUE for the servlet? Independent. oriented. logic. thread.
Carefully read the question and answer accordingly.
While architecting a system, if "minimum down time" is the
primary expected behavior of the system, the system Applicatio Proxy
architecture should be based on ------------------- Firewall Cluster n Servers Server

Carefully read the question and answer accordingly.


Consider the following statements:
Statement A: A resource is passive when it does not have any Statement Statement Statement
processing of its own. Statement A A is true A is false A is false
Statement B: The content of a passive resource does not is true and and and and
change. statement B statement statement statement
Which of the following is true about these statements? is true. B is false. B is true. B is false.
Layered
architectu
re can be
Layered used to Developm
architecture increase ent will be
separates the Testing or slower,
functionalities the decrease because
to individual communic the level more
layers, ation of layers to
thereby across abstractio code &
Carefully read the question and answer accordingly. improving multiple n integratio
Which of the following is / are true about the layered maintainabilit layers is between n cost is
architecture style? y & reusability complex layers higher
It is not a
Carefully read the question and answer accordingly. ServletRe HttpServl sub-
HttpServletRequest is a sub interface of ____________. HttpRequest quest et interface
Carefully read the question and answer accordingly.
HTTP protocol allows asynchronous transactions between a
client and server TRUE FALSE

Carefully read the question and answer accordingly.


The proposed web application need to access two databases,
for performing the business operations. Which of the API in
J2EE package will support to achieve this functionality? JNDI JTA JPA JMS
Carefully read the question and answer accordingly.
A server will serve a request. Application Server handles
request that needs dynamic content, whereas a web server will
handle the request for static content. TRUE FALSE
These are
responsibl
e for
managing
the
lifecycle
of
servlets,
mapping
a URL
(Universal
Resource
Locator)
to a
particular
servlet,
and
ensuring
that the
URL These are
These are requester also
specialized has got referred
Web servers, the to as Web
which support correct container All of the
Carefully read the question and answer accordingly. servlet access s or Web listed
Which of the following is applicable to Servlet Containers? execution rights engines. options

to provide to provide
the listener
configurat informatio
ion details n to notify
on how certain has to list
the web classes down the
server when external
should some API's
provides use them events which are
security to serve (like used in
Carefully read the question and answer accordingly. information of the session the web
Which of the following can be considered as role(s) of a the incoming creation) applicatio
deployment descriptor in a .war or .ear modules? application requests happen n

Carefully read the question and answer accordingly.


Which of the following methods are not implemented by the
RequestDispatcher interface?
1.redirect()
2.forward()
3.include()
4.dispatch() 1&2 3&4 2&3 1&4
Carefully read the question and answer accordingly.
If 1000 users are accessing SampleServlet how many actual
object of servlets exist in web container? 1000 1 10
Carefully read the question and answer accordingly.
In "n-tier" architecture style, the layers of a web application
reside over multiple physical computers. TRUE FALSE
Carefully read the question and answer accordingly. <param- <param-
Which of the following tag is NOT a part of the web.xml file? <servlet> <action> name> value>

Will be
bundled
inside the
applicatio
n, hence
Carefully read the question and answer accordingly. no need
A web application contains images to be displayed across the to deploy
UI screens. In a typical production environment, where these Application Web Proxy individuall
images will be deployed? Server Server Server y
Carefully read the question and answer accordingly.
For every HTTP request, static contents will be served by a
web server, whereas if dynamic content is requested, web
server forwards the request to application server. TRUE FALSE
Carefully read the question and answer accordingly.
Always the enterprise archive (EAR) files will be deployed in a
web container TRUE FALSE
Carefully read the question and answer accordingly.
The method getWriter() of HttpServletResponse returns an HttpServletRe PrintWrite ServletCo ServletCo
object of type ____________. quest r ntext nfig
Carefully read the question and answer accordingly. Applicatio
Which of the following Java EE containers manages the Web n client Applet
execution of enterprise beans for Java EE applications? EJB container container container container

Carefully read the question and answer accordingly.


A proxy server will allow to cache web pages in your computer TRUE FALSE

Carefully read the question and answer accordingly.


Which are lifecycle methods of Servlet Interface?
1.public abstract void init(ServletConfig config)
2.public abstract void service(ServletRequest req,
ServletResponse res)
3.public abstract void destroy(ServletContext)
4.public abstract void destroy() 1&2&3 2&3&4 1&2&4 3&2
Carefully read the question and answer accordingly.
Websphere Application server is a open source server TRUE FALSE
To access
the
applicatio
Web n, the
applicatio device
ns allows like
the users mobile
to invoke phones,
from any tablets,
Little or device computer
no like s need to
web diskspace mobile open the
application is phones, port for
provides required tablets connectivi
Carefully read the question and answer accordingly. cross platform on the that has ty to web
Which of the following is / are true about web applications? compatibility client browsers server

Carefully read the question and answer accordingly.


If the proposed system to be developed to handle concurrent
user requests, with reduced turn-around time & resource Load Applicatio Web
usage, then the architecture should employ --------------- Firewall Balancer n Servers Server
Carefully read the question and answer accordingly.
URL and URN are one and the same TRUE FALSE
session.is session.re
Carefully read the question and answer accordingly. session.isAliv New(false session.in moveSes
Which of the following code line will destroy a session? e = false; ) validate() sion()
All of the
Carefully read the question and answer accordingly. Hidden listed
Which of the following techniques are used to track session? URL rewriting Cookies Field options

Carefully read the question and answer accordingly.


Mark is developing a web based application. The home page is
a servlet that accepts the user name and password. Mark does
not want the user to enter the username every time he logs
into the website. He wants to find a way to store the value on
the user's machine. Which method should he use so that the addCooki addSessi getSessio
value gets stored on the user's machine? getCookie() e() on() n()
Carefully read the question and answer accordingly.
HTTP is stateful protocol which maintains clients state
automatically. State True or False. FALSE TRUE
Carefully read the question and answer accordingly.
Which of the following method of the HttpServletRequest
object is used to get the clients session information in the getSessio getValue(
HttpSession object? putValue() doPost() n() )
Session
timeout
Session declaratio
Session timeout ns made
timeout declaratio programm
Session declaratio ns made atically
timeout ns made programm can
declarations in the atically specify
made in the DD(web.x can time
DD(web.xml) ml) can specify either in
can specify specify time only minutes
Carefully read the question and answer accordingly. time in time in in or
Which statements about session timeouts are true? seconds. minutes. seconds. seconds.

Carefully read the question and answer accordingly.


A container does not initialize the servlets as soon as it starts
up, it initializes a servlet when it receives a request for that
servlet first time. This is called lazy loading.State True or False. TRUE FALSE

Carefully read the question and answer accordingly. setMaxIn setMaxIn


Which method of HttpSession interface is used for specifying setMaxInterv activeInte active_int setInactiv
the length of inactive interval for a session object? al() rval() erval() eInterval()
Carefully read the question and answer accordingly. HttpSessi HttpSessi
Which of the following listeners are invoked when a session is HttpSessionB HttpListen onListene onAttribut
created? indingListener er r eListener
Carefully read the question and answer accordingly.
Given that URL-rewriting must be used for session
management, identify the query string attribute used when containeri
URL-rewriting. sessionid jsessionid servletid d

Carefully read the question and answer accordingly.


Which two of the following are true statements about sessions?
1.Sessions are destroyed only after a predefined period of
inactivity
2.Sessions can span web applications
3.Sessions can be cloned across JVMs
4.You can use the deployment descriptor to cause sessions to
expire after a set number of requests
5.Sessions can be set to never time out 1&2 1&3 2&3 3&5

Carefully read the question and answer accordingly.


How can an existing session in servlet can be destroyed ?
1.programmatically using session.invalidate()
2.by calling session.service() method
3.by closing the browser
4.when the server itself is shut down 1&2 1&3 2&3 2&4

Carefully read the question and answer accordingly.


Servlet A receives a request that it forwards to servlet B within
another web application in the same web container. Servlet A
needs to share data with servlet B and that data must not be HttpServl
visible to other servlets in A's web application. In which object etRespon ServletCo HttpServl
can the data that A shares with B be stored? HttpSession se ntext etRequest
public public
void void
doGet(Htt doGet(Htt
pServletR pServletR
equest equest
public void req, req,
doGet(HttpSe HttpServl HttpServl
rvletRequest etRespon etRespon
req, se res) se res)
HttpServletRe throws throws
sponse res) ServletEx ServletEx
throws ception, ception,
ServletExcept IOExcepti IOExcepti
ion, on on
IOException { { session { Session
HttpSession = session =
session = req.getSe req.getSe
req.getSessio ssion(); ssion();
n(); session.g session.s
session.setAtt etAttribute etAttribute
Carefully read the question and answer accordingly. ribute("BookI ("BookID", ("BookID", None of
Choose the valid option for creating session object and to add D","Core "Core "Core the listed
a attribute "BOOKID" into session object. Java"); } Java"); } Java"); } options
request.cr request.g request.m
Carefully read the question and answer accordingly. request.getSe eateSessi etSession akeSessi
How do you create a session? ssion() on() Object() on()

Carefully read the question and answer accordingly.


In which of these following getAttibute()  and setAttribute()
method has defined?
1.HttpSession
2.ServletRequest
3.ServletResponse
4.HttpListener 1&3 2&3 1&2 3&4
Carefully read the question and answer accordingly.
Which of the following Listener can get context init parameter ServletConte ServletCo HttpSessi None of
and run some code before rest of the application can service a xtAttributeList ntextListe onListene the listed
client? ener ner r options
Carefully read the question and answer accordingly. ServletRe
If you want to know when a request attribute has been questAttri HttpRequ None of
removed,added or replaced, then which listener is the ServletReque buteListe estListene the listed
appropriate one? stListener ner r options
Carefully read the question and answer accordingly. ServletRe HttpSessi HttpSessi
Which of the following Listener is used to track number of ServletReque questListe onListene onBinding
active sessions or users? stListener ner r Listener
Carefully read the question and answer accordingly. None of
Which one is required as a sub-element of listener tag  in <listener- <listener- <listener- the listed
Deployment Descriptor? type> class> attribute> options

Carefully read the question and answer accordingly.


Sam is writing a web application program. He has implemented
ServletContextListener interface in his web application
program. Which method of ServletContextListener interface he initiateCo contextInit
should use to perform startup activities for web application? init() ntext() ialized() start()
Carefully read the question and answer accordingly.
How will you retrieve the first value of request parameter
“fname”?
1.${param.fname}
2.${requestParams.fname}
3.${requestScope.fname}
4.${paramValues.fname[0]} 1&3 2&3 1&2 1&4
$
$ $ {contextP
Carefully read the question and answer accordingly. $ {init['comp {initParam aram.com
How will you access a servlet context initialization parameter {init.company- any- [“compan pany-
named “company-name”? name} name']} y-name”]} name}

Carefully read the question and answer accordingly.


Which of following are EL implicit objects?
1.pageContext
2.parameter
3.parameterValues
4.header
5.session 1&4 2&4 3&4 4&5

Carefully read the question and answer accordingly.


What is the syntax of Expression Language in a JSP page? ${expr} #{expr} ${"expr"} $[expr]
Carefully read the question and answer accordingly.
Predict output of Expression Language ${7*k} if k is null: null 7 error
Carefully read the question and answer accordingly.
Expression Language treats null values as “zero” In arithmetic
operations.State True or False. TRUE FALSE

Carefully read the question and answer accordingly.


Consider the following servlet code segment:
Map map = new HashMap();
map.put(“a”, “1”);
map.put(“b”, “2”);
map.put(“c”, “3”);
map.put(“d”, “4”);
request.setAttribute(“map”, map);
String[] names = {“a”, “b”, “c”, “d”}; Nothing None of
request.setAttribute(“names” , names); will be the listed
What does ${map[names[0]]} return? a displayed 1 options

Carefully read the question and answer accordingly.


<%
List list=new ArrayList();
list.add("a");
list.add("2");
list.add("c");
request.setAttribute("list",list);
request.setAttribute("number","1");
%>
Based on the above code segment, which of the following will
display "c"?
1.${list[2]}
2.${list.2}
3.${list[number+1]}
4.${list.3} 1&3 2&3 2&4 3&4
Carefully read the question and answer accordingly. headerVal pageCont
Which of the following EL implicit objects is not a Map? requestScope initParam ues ext
$ $ $ None of
Carefully read the question and answer accordingly. {param.addre {Values.a {request.a the listed
Code to get the value of “address” request parameter is: ss} ddress} ddress} options
request.g
Carefully read the question and answer accordingly. $ etParame None of
Choose valid expression language statement for accessing #{param.useri {param.us ter("userid the listed
textfield elements whose name is userid. d} erid} "); options

Carefully read the question and answer accordingly.


Consider the code segment given below:
List list = new ArrayList();
list.add(“1”);
list.add(“2”);
list.add(“3”);
list.add(“4”);
request.setAttribute(“list”, list);
String[] names = {“a”, “b”, “c”, “d”, “e”};
What will ${names[list[0] + 1]} display? a,b b c a,b,c

Carefully read the question and answer accordingly.


Select correct options with respect to Expression Language
(EL) used in JSP
1.The purpose of EL is to make a JSP script free
2.EL is a simple and powerful replacement of Standard Actions
3.EL is enabled in a JSP by default
4.EL stands for Extended Language 1&2 1&2&3 2&3 1&2&4

Carefully read the question and answer accordingly.


You have a map named “carMap” with a key named “Ford”.
Select correct EL syntaxes to print the value of this key.
1.${carMap.Ford}
2.${carMap.[Ford]}
3.${carMap[“Ford”]}
4.${carMap[Ford]} 1&2 1&3 2&3 2&4

Carefully read the question and answer accordingly.


Consider the following statements:
Statement A: A tag library descriptors an XML document that
contains information about a library as a whole and about each Statement Statement Statement
tag contained in the library. Statement A A is true A is false A is false
Statement B: TLDs are used by a Web container to validate is true and and and and
the tags used by JSP page development tools. statement B statement statement statement
Which of the following is true about these statements? is true. B is false. B is true. B is false.
Carefully read the question and answer accordingly.
<?xml version="1.0" encoding="UTF-8"?> <%@
<taglibxmlns="http://java.sun.com/xml/ns/j2ee" <%taglib <%@ taglib
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" prefix="pr taglib prefix="pr
xsi:schemaLocation="http://java.sun.com/xml/ns/j2eeweb- e" prefix="pr e"
jsptaglibrary_2_0.xsd" version="2.0"> uri="testur e" uri="testur
<tlib-version>2.0</tlib-version> i" %> uri="testur i" %>
<short-name>SimpleTagForLearning</short-name> <html> i" %> <html>
<uri>testuri</uri> <%@ taglib <head> <html> <head>
<tag> prefix="pre" <title>De <head> <title>De
<name>helloworld</name> uri="testuri" mo on <title>De mo on
<tag-class>com.cts.MyTagHandler</tag-class> %> <html> helloworld mo on helloworld
<body-content>empty</body-content> <head> Custom helloworld Custom
<attribute> <title>Demo tag</title> Custom tag</title>
<name>attrb</name> on </head> tag</title> </head>
<required>true</required> helloworldCus <h1> </head> <h1>
<rtexprvalue>true</rtexprvalue> tom <pre:hello <h1> <helloworl
</attribute> tag</title> world <pre:hello d
</tag> </head> <h1> attrib="Jo world "attrb"="J
</taglib> <pre:helloworl hn"> attrb="Joh ohn"/>
For above mentioned .tld select correct tag usage option in d/> </h1> </h1> n"/> </h1> </h1>
JSP page. </html> </html> </html> </html>

Carefully read the question and answer accordingly.


Consider the following statements:
Statement A: When tags are implemented with tag handlers
written in Java, each tag in the library must be declared in the
TLD with a tag element. Statement Statement Statement
Statement B: The tag element contains the tag name, the class Statement A A is true A is false A is false
of its tag handler, information on the tag's attributes, and is true and and and and
information on the variables created by the tag. statement B statement statement statement
Which of the following is true about these statements? is true. B is false. B is true. B is false.
Carefully read the question and answer accordingly. javax.serv javax.serv
TagSupport and BodyTagSupport classes are present in which java.servlet.js javax.serv let.jsp.tag. let.jsp.tag
package? p.tagext let.jsp.tag ext ext

Carefully read the question and answer accordingly.


What is the output of the current code segment ?
<c:forTokens items=“a,b,c,d,e” delims=“,” begin=“0” end=“4”
step=“2” var=“alphabet”>
<c:out value=“${alphabet}”/>
</c:forTokens> a,c,e b,d a,b,c c,d,e

<a <a <a


href='<c:li href='<c:u href='<c:li
<a nk rl nk
Carefully read the question and answer accordingly. href='<c:url url="cogni value="co value="co
Which JSTL code snippet can be used to perform URL url="cognizan zant.jsp"/ gnizant.js gnizant.js
rewriting? t.jsp"/>'/> >'/> p"/>'/> p"/>'/>
Carefully read the question and answer accordingly. <c:out <c:out <c:expr
Using prefix c to represent the JSTL library, which of the <c:var out=$ value=$ var="var" value=var
following produces the same result as <%= var %>? {var}> {var}> > >
There is
no
Carefully read the question and answer accordingly. standard
Which standard tag you choose to implement the switch tag for
functionality using JSTL? <c:forEach> <c:when> <c:if> switch

Carefully read the question and answer accordingly.


Which attribute of <c:if> specifies the conditional expression? cond check expr test

Carefully read the question and answer accordingly.


Which of following are standard JSTL?
1.http://java.sun.com/jstl/xml/fmt
2.http://java.sun.com/jstl/core/fmt
3.http://java.sun.com/jstl/xml
4.http://java.sun.com/jstl/sql
5.http://java.sun.com/jstl/core 1&2&3 2&3&4 1&2&4 3&2&5

<font <font <font


color='gre color='gre color='gre
en'> <ul> en'> <ul> en'> <ul>
Carefully read the question and answer accordingly. <c:forEac <c:forEac <c:forEac
Consider the usage of JSTL forEach tag in the following code <font h h h
snippet: color='green'> flag="errm flag="errm flag=errm
<font color='green'> <ul> sg" sg" sg
<ul> <c:forEach items="$ items="$ items="$
<c:foreach flag=errmsg items="${errorMsgs}"> flag=errmsg {errorMsg {errorMsg {errorMsg
<li>$errmsg</li> items="$ s}"> <li>$ s}"> s}"> <li>$
</c:forEach> {errorMsgs}"> {errmsg}< <li>$errm {errmsg}<
</ul> <li>$errmsg</ /li> sg</li> /li>
</font> li> </c:forEac </c:forEac </c:forEac
The code snippet contains some errors. Predict the correct </c:forEach> h> </ul> h> </ul> h> </ul>
code. </ul> </font> </font> </font> </font>

<jsp:useB
ean
<jsp:useB id="myBe <jsp:useB
Carefully read the question and answer accordingly. <jsp:useBean ean anAttribut ean
If you would like the JSP container to first try to find the id="myBeanA id="myBe e" id="myBe
“myBeanAttribute” attribute in the request scope. If it’s not ttribute" anAttribut type=”co anAttribut
existing then should create the instance of “MyBean” and then class=”com.ct e" m.cts.My e"
assign it to the “myBeanAttribute “ id variable in JSP and sets it s.MyBean" class=”co Bean" type=”co
as an attribute to the request scope. scope="reque m.cts.My scope=”re m.cts.My
Which of the given option will help you to attain this? st" /> Bean" /> quest”/> Bean" />
It will
iterate
It will over the
iterate current
over the ServletRe
It will iterate current quest
over the ServletRe parameter
current quest s and
ServletReque parameter would not
Carefully read the question and answer accordingly. st parameters s getting set any
Smith is developing an application using Java Server Pages. setting each each property
The name of the component that he has matched property to the
created is "Emp". he has included the following statement in property to to the value of
her application: the value of value of It will give the
<jsp:setProperty name="Emp" property=* /> the matching the a run-time matching
What would be the result of the above code? parameter parameter error. parameter

A
message
box
stating for
user's
confirmati
on about
The terminatio
execution n or
Carefully read the question and answer accordingly. The of the continuati
Consider the following code snippet: execution of current on of the
<jsp:forward page="relativeURLspec"/> the current page is A run time applicatio
Which of the following statements is true about the execution page terminate error is n is
status of the page where this statement has been written? continues. d. displayed. displayed.

<jsp:impo <jsp:inclu
rt <jsp:impo de
page=”us rt path=”use
er- file=”user- r-
pref.jsp”> pref.jsp”> pref.jsp”>
<jsp:para <jsp:para <jsp:para
<jsp:include m m m
page=”user- name=”us name=”us name=”us
pref.jsp”> erPref” erPref” erPref”
<jsp:param value=”$ value=”$ value=”$
name=”userP {user.pref {user.pref {user.pref
Carefully read the question and answer accordingly. ref” value=”$ erence}” / erence}” / erence}” /
In an web page how would you write the JSP standard action {user.prefere > > >
code to import a JSP segment that generates user preference nce}” /> </jsp:inclu </jsp:impo </jsp:inclu
specific content? </jsp:include> de> rt> de>
<jsp:useB
ean
Carefully read the question and answer accordingly. id="accou
Given a servlet that stores an Account bean in the session nt"
scope with the following code snippet: <jsp:useB type="co
public void doPost(HttpServletRequest req, ean m.cts.Acc
HttpServletResponse resp) { id="accou ount”
HttpSession session = req.getSession(); nt" scope="s
com.cts.Account acc= new com.cts.Account(); type=”co ession"/>
emp.setAccountNumber(req.getParameter(“acc_num”)); m.cts.Acc <jsp:getPr
session.setAttribute(“account”, acc); ount” /> < operty
RequestDispatcher page = <%= %= name="ac
req.getRequestDispatcher(“index.jsp”); <%= employee employee count"
page.forward(req, resp); account.getA .getAccou .getAccou property="
} ccountNumbe ntNumber ntNumber accountN
Which of these complete JSPs will print the account number? r() %> ();%> (); %> umber" />

The code The code


sets the does not
The code values of compile
Carefully read the question and answer accordingly. The code sets value all as there
What is the effect of executing the following JSP statement, does not of all properties is no
assuming a class with name Employee exists in com.cts compile as properties of property
package. property of employee attribute
<jsp:useBean id="employee" class="com.cts.Employee" attribute employee bean with of
scope="session"/> cannot take * bean to default setProper
<jsp:setProperty name="employee" property="*"/> as a value. "*". values. ty tag.

<jsp:useB
ean <jsp:useB
identity="l <jsp:useB ean
ogin" ean id="login"
scope="S id="login" scope="S
<jsp:useBean ession" scope="S ession"
id="login" class="s.b ession" class="s.b
scope="Sessi eans.Logi class="s.b eans.Logi
on" nBean"> eans.Logi nBean">
class="s.bean <%! nBean"> <login.set
s.LoginBean" login.setV login.setV Value(req
> <% alue(requ alue(requ uest.getP
Carefully read the question and answer accordingly. login.setValu est.getPar est.getPar arameter(
Consider the following code snippet of JSP Bean: e(request.get ameter("L ameter("L "Loginid"))
<jsp:usebean identity="login" scope="Session" Parameter("L oginid")); oginid")); ;/>
class=s.beans.LoginBean> oginid")); login.setA login.setA <login.set
<%! login.setAddr ddress(re ddress(re Address(r
login.setValue(request.getParameter("Loginid")); ess(request.g quest.get quest.get equest.ge
login.setAddress(request.getParameter("address")); etParameter(" Paramete Paramete tParamet
%> address")); r("address r("address er("addre
<jsp:usebean> %> ")); %> ")); ss"));/>
However the preceding code contains errors. Predict the </jsp:useBea <jsp:useB </jsp:use </jsp:use
correct code. n> ean> Bean> Bean>
Carefully read the question and answer accordingly.
Lisa is a web developer she developing dynamic web
application using JSP. She want to include "Header.jsp" in all
JSP page which she have designed. Which of the following
statement includes Header.jsp file?
1.<jsp:include page=“Header.jsp”/>
2.<jsp:include file=“Header.jsp”/>
3.<%@include file=“Header.jsp”%>
4.<%@include page=“Header.jsp”%> 1&3 2&3 1&2 3&4

Carefully read the question and answer accordingly.


For the given Employee class
package com.cts;
public class Employee{
private String strEmpID="";
public String getEmpId() {
return this.strEmpID;
}
public void setEmpId(String strEmpID){
this.strEmpID=strEmpID;
}
}
We have the JSP file
<jsp:useBean id="employee" class="com.cts.Employee"
scope="request">
<property name="person" property="empId" value="<%=
request.getParameter("empId")%>" />
</jsp:useBean> <jsp:getPr
<html> <jsp:getPrope <Jsp:getP <Jsp:getP operty
<body> rty roperty roperty name="e
Employee Id: name="emplo name="e name="e mployee"
</body></html> yee" mployee" mployee" property="
Identify the JSP tag from the given options to print the property="str property=" property=" employee
employee id. EmpID"/> EmpID"/> empId"/> .empId"/>

<jsp:inclu
de <jsp:insert
page='W file='WEB
EB- <jsp:inclu -
Carefully read the question and answer accordingly. INF/jsp/he de INF/jsp/he
Your web application views all have the same header which <jsp:insert ader.jsp'> file='WEB ader.jsp'>
includes <title> tag in the <head> element of the rendered page='WEB- <jsp:para - <jsp:para
HTML. You have decided to remove the redundant HTML code INF/jsp/heade m INF/jsp/he m
from your JSPs and put into a single JSP called /WEB- r.jsp'> name='pa ader.jsp'> name='pa
INF/jsp/header.jsp. However, the title of each page is unique, <jsp:param geTitle' $ geTitle
so you have decided to use variable called pageTitle to name='pageT value='W {pageTitle value=”W
parameterize this in the header JSP like this: itle' elcome ='Welcom elcome
<title> ${param.pageTitle}</title> value=”Welco Page'/> e Page'} Page” />
Which JSP code snippet you use in your main view JSPs to me Page” /> </jsp:inclu </jsp:inclu </jsp:inser
insert the header and pass the pageTitle variable? </jsp:include> de> de> t>
page, page,
request, response,
page, response session
Carefully read the question and answer accordingly. request, page and and and
Identify the different values which a scope attribute of a session and request applicatio applicatio
<jsp:useBean>action can set? application. only n n

<% if
(request.r
etrievePar <% if
ameter(" <% if (request.g
marks"))> (request.g etParame
=60) { %> etParame ter("marks
<jsp:move ter("marks "))>=60)
<% forward "))>=60) { %>
if(Integer.pars page="Ex { %> <jsp:jsppa
eInt(request.g .jsp"> <jsp:forwa ram="Ex.j
etParameter(" </jsp:forw rd sp">
Carefully read the question and answer accordingly. marks"))>=60 ard> <% } page="Ex </jsp:forw
Lisa is a systems programmer at ABC Consultants. She has ) { %> else { %> .jsp" /> < ard> <% }
written an application to accept student marks in the variable <jsp:forward <jsp:move % } else else { %>
marks. If the student has scored marks greater than 60. She page="Ex.jsp" forward { %> <jsp:jsppa
needs to forward the control of the program to another file /> <% } else page="Av <jsp:forwa ram="Av.j
called as "Ex.jsp" else the control should be forwarded to a file { %> .jsp"> rd sp">
called as "Av.jsp". <jsp:forward </jsp:forw page="Av </jsp:forw
Which of the following code snippets should she use for page="Av.jsp" ard> <% } .jsp"> < ard> <% }
checking this condition and forward control? /> <% } %> %> % } %> %>

<jsp:setPr
operty>
<jsp:useBean <jsp:getPr
><jsp:setProp <jsp:useB operty> <jsp:useB
Carefully read the question and answer accordingly. erty> and ean> and and ean> and
Identify the different actions which are generally used while <jsp:getPrope <jsp:inclu <jsp:forwa <jsp:plugi
integrating JavaBeans with JSP? rty> de> rd> n>
Carefully read the question and answer accordingly.
Which attribute of the page directive indicates that the JSP
engine can handle more than one request at a time when its
value is set to true? IsThreadSafe Info autoflush extends
Carefully read the question and answer accordingly.
Sally has written the following code to access the Employee
bean that has already been created with the property called
EmpNumber:
<html>
<body>
<jsp:useBean id="employee" scope="session"
class="Employee" />
<b> The current count for the Employee bean is:</b> <
%employee.getEmpNumber()%>
</body>
</html>
The bean has the following code in the getEmpNumber
method:
public int getEmpNumber()
{ The value will
EmpNumber++; be The value The
return this.EmpNumber; incremented will be syntax The value
} everytime the always error will be
Which of the following statements is true about the output of page is displayed would be equal to
the above code when the page is loaded and reloaded? loaded. as 1. displayed. 10.
Carefully read the question and answer accordingly.
Which of the following objects of JSP contain the servlet applicatio
configuration? config n out page
Carefully read the question and answer accordingly.
Which of the following variable represents the uncaught
throwable object that resulted from a call to the error page in
JSP? Application Config Exception Request
Carefully read the question and answer accordingly.
Which object of JSP holds reference to PageCont
javax.servlet.http.HttpSession object? session request response ext

Carefully read the question and answer accordingly.


What will be the output of the following code snippet?
<% page language="java"%>
<html>
<head></head> It will
<body> display
<%java.util.Date now=new java.util.Date(); %> It will the
<H1><%= now.getHours() %>:<%=now.getMinutes()%>:< It will display current
%=now.getSeconds()%></H1> It will display display time as time as
</body> the date as the date hh/mm/ss hh:mm:ss
</html> mm:dd:yy. and time. . .

Declaring Putting
Putting <scripting scripting-
<scripting- -invalid> invalid=tru
invalid> tag at the e attribute Scripting
Carefully read the question and answer accordingly. element in top of in form can’t be
Scripting can be blocked in a jsp by: web.xml JSP page tag blocked
Carefully read the question and answer accordingly.
Gen wants to create a new JSP page. Which element of JSP Expressio Declaratio
provide global information about an entire JSP page? Scriptlet Directive n n
Carefully read the question and answer accordingly.
Manisha is creating an application which makes use of Java
Server pages. Which of the following implicit object she should
use to get a reference to the JSPWriter? out in request response

Print Write a
Carefully read the question and answer accordingly. something on Declare a Import a block of
The purpose of a JSP Expression tag is to: the screen variable java class java code
Carefully read the question and answer accordingly.
A scriptlet contains Java code that is executed every time a
JSP is invoked.State True or False. TRUE FALSE
Carefully read the question and answer accordingly.
You are developing dynamic web application using JSP. Which
attribute of page directive specifies the list of classes imported
in the JSP file? import session extends language

<html> < <html> < <html> <


% String %= String %! String
message message message
="hello ="hello ="hello
world"; world"; world";
<html> <%! String String String
String getMessa getMessa getMessa
message="he ge() ge() ge()
llo world"; { return { return { return
String message; message; message;
getMessage() } %> } %> } %>
{ return Message Message Message
message; } for you:< for you:< for you:<
Carefully read the question and answer accordingly. %> Message %= %= %!
Gen has written a JSP code in which he is calling the for you:<%= getmessa getMessa getMessa
getMessage() function which is returning a value "hello world". getMessage() ge() %> ge() %> ge() %>
You have to identify which code should he use to get this? %> </html> </html> </html> </html>

< %=
< %! < %@ public
String String String
Carefully read the question and answer accordingly. <!% String name="R name="A name="A
Which of the following is valid declaration in JSP using name="Rocky ocky"; % nand" % nand"; %
declaration tag? "%> > > >

Carefully read the question and answer accordingly. isScriptin


Which of the following attributes of page directive are invalid? isELIgnored gEnabled session language

Carefully read the question and answer accordingly.


A Web application developed for an institution requires <form <%@ <jsp:forwa
insertion of a header file comprising the logo and institution method="post include rd <% page
name. Identify the correct JSP tag from the options given " file="Head page="He import="H
below to add the logo and institution name to all the pages of action="Head er.html" ader.html" eader.htm
the Web application. er.html"> %> > l" %>
<%@ <%@ <%@
page page page
Carefully read the question and answer accordingly. <%@ page ErrorPage isErrorPa ErrorPage
Consider you are developing web application which following isErrorPage=" ="true" ge="false" ="false"
code snippet listed depicts that the JSP page is an errorpage? true" %> %> %> %>
Carefully read the question and answer accordingly.
Given the JSP code:
<% request.setAttribute("foo", "bar"); %> It is NOT
and the Classic tag handler code: possible
5. public int doStartTag() throws JspException { to access
6. // insert code here the String x =
7. // return int String x = pageCont (String)
8. } String x = (String) ext object pageCont
Assume there are no other "foo" attributes in the web (String) pageCont from ext.getRe
application. pageContext. ext.getRe within quest().ge
Which invocation on the pageContext object, inserted at line 6, getAttribute("f questSco doStartTa tAttribute(
assigns "bar" to the variable x? oo"); pe("foo"); g. "foo");
<%@ <%@
<%@ include include
Carefully read the question and answer accordingly. <%@ page page import="ja autoFlush
Consider you are developing web application. Which of the import="java. session="t va.util.*" ="java.util.
following option is a valid in JSP for importing the package? util.*" %> rue*" %> %> *" %>
Carefully read the question and answer accordingly. <% page <%
Consider you are creating a JSP page. You want to use the <%@ page import import="ja <% import
classes of java.util package. Which statement will you use to import="java. java.util.* va.util.*" java.util.*
import the java.util package? util.*" %> %> %> %>

A servlet
configuration The
object used ServletCo Defines
by a servlet nfig object an object
container to is to provide
pass contained client
information to within the request
a servlet ServletCo informatio All of the
Carefully read the question and answer accordingly. during ntext n to a listed
What is the use of ServletConfig interface? initialization object. servlet options

void void
setAttribut void setAttribut
void e(String setAttribut e(Object
Carefully read the question and answer accordingly. setAttribute(S name, e(Object object,
Which method binds an object to a given attribute name in this tring name, String object,Stri Object
ServletContext interface? Object object) value) ng name) object)
Carefully read the question and answer accordingly. javax.Ser
Which of the following interface represents the Servlet Config javax.servlet. vlet.Confi javax.Con Servlet.C
for the current Servlet? ServletConfig g fig onfig
after after after
Carefully read the question and answer accordingly. after init() construct service() servlet is
ServletConfig comes into picture _______. runs or runs runs loaded
Carefully read the question and answer accordingly. <servlet-
Which of the following tag is used to specify the initialization mapping <url-
parameters in the web.xml file? <init-param> <servlet> > pattern>
Carefully read the question and answer accordingly. None of
What is the return type of getAttribute() method of the listed
HttpServletRequest ? Object String Attribute options
Carefully read the question and answer accordingly. getInitPar
Which method of ServletConfig interface returns a String getInitParame getServlet ameterNa
containing the value of the named initialization parameter, or ter(String getParam Name(Stri me(String
null if the parameter does not exist? name) eter() ng name) name)
void void void
Carefully read the question and answer accordingly. void clearAttrib removeAtt removeAtt
Which method removes the attribute with the given name from flushAttribute( ute(String ribute(Obj ribute(Stri
the ServletContext interface? String name) name) ect name) ng name)

public
void
_jspServi public public
ce(HttpSe void void
private void rvletRequ _jspServi _jspServi
_jspService(H est ce(HttpSe ce(HttpSe
ttpServletReq request, rvletRequ rvletRequ
uest request, HttpServl est est
HttpServletRe etRespon request, request,
sponse se HttpServl HttpServl
response)thro response) etRespon etRespon
ws throws se se
ServletExcept ServletEx response) response)
ion, ception, throws throws
Carefully read the question and answer accordingly. java.io.IOExc java.io.IO ServletEx java.io.IO
Which of the following is valid _jspService() method signature? eption Exception ception Exception

Carefully read the question and answer accordingly. JSPComp


If an error occurs while the JSP page is being compiled, the ParseExcepti JasperEx Compiler ilerExcept
server will return a Exception. Identify the type of the Exception on ception Exception ion
The The
Carefully read the question and answer accordingly. source compiled
When a JSP is executed, out of the following, what is most The source Servlet Servlet
likely to be sent to the client? JSP file file HTML file
Carefully read the question and answer accordingly.
_jspService() method cannot be overridden by the author. Say
True or False TRUE FALSE

Carefully read the question and answer accordingly.


Consider the following code with line number given below:
Line 4: <%! int a=6; %> It will
Line 5: <% int b=8; %> compile
Line 6: Result is <%= a*b; %> successfu
Which of the following are true with respect to the above code Line 4 is Line 5 is Line 6 is lly and
segment? invalid invalid invalid print 48
Carefully read the question and answer accordingly.
JSP files stored in the WEB-INF directory cannot be seen
directly from a visiting web browser. Say True or False TRUE FALSE
Carefully read the question and answer accordingly.
During the JSP translation if the translator encounters a Malforme Translatio
malformed JSP element), the server will return Exception. ParseExcepti JasperEx dElement nExceptio
Identify the type of the Exception. on ception Exception n
None of
Carefully read the question and answer accordingly. _jspServi jspDestro the listed
Which of the following methods can not be over-ridden ? jspInit() ce() y() options
Container
doesn't
Carefully read the question and answer accordingly. mind JSP
JSP syntax errors are caught during which lifecycle event of Compilati Translatio syntax
JSP? Execution on n errors
Carefully read the question and answer accordingly.
Identify the life cycle method that is called to initialize the jspInitializ
instantiated servlet instance. jspInitialize() jspInitit() jspInit() ation()
Carefully read the question and answer accordingly.
_jspService() method is called only for the first time a request
comes to jsp during its lifecycle TRUE FALSE

It
depends
on the
Carefully read the question and answer accordingly. WEB- servlet
Identify the location in which the translated JSP servlet code INF/class container WEB-
will be stored WEB-INF es settings INF/class

Carefully read the question and answer accordingly.


A Java Server Page (JSP) cannot be deployed in web server TRUE FALSE
None of
Carefully read the question and answer accordingly. Undeploy the listed
Translation and Compilation of JSP happens during: Deployment Execution ment options
Carefully read the question and answer accordingly.
jspInit() method can be overridden by the author. Say True or
False TRUE FALSE

JSP page
is
translated JSP is
JSP page is to a compiled,
translated to servlet, JSP page
a servlet, code is is JSP is
servlet is compiled, translated loaded
loaded into servlet is to a into
memory, loaded servlet, memory,
code is into code is Code is
Carefully read the question and answer accordingly. compiled, memory, loaded, compiled,
Which of the following describes the jsp life cycle process instance is instance instance instance
best? created is created is created is created
Carefully read the question and answer accordingly. No need
Which protocol Servlets and JSP use to communicate with of any
clients? HTTP FTP SMTP protocol
Carefully read the question and answer accordingly.
Identify the method in which all our scriptlets code will be jspServic _jspServi jspInitializ
placed jspInit() e() ce() ation()

Carefully read the question and answer accordingly.


While overriding the destroy method(life cycle method), we
should always handle the JasperExpception. Say true or false TRUE FALSE
<scripting None of
Carefully read the question and answer accordingly. <is-scripting- <scripting - the listed
Which of the following tag disables scriplets? invalid> -invalid> disabled> options
Carefully read the question and answer accordingly. HttpServletRe ServletHtt ServletRe HttpRequ
In JSP request implicit object is of which type? quest pRequest quest est
Servlet Multithrea Applicatio
Carefully read the question and answer accordingly. lifecycle ding JSP n
Which of the following is NOT a Container feature? management support support Controller

Carefully read the question and answer accordingly.


Consider the following statements: Statement Statement Statement
Statement A: JSP page is a text-based document that contains Statement A A is true A is false A is false
two types of text viz. Static template data & JSP elements is true and and and and
Statement B: JSP is used for presentation stuff and servlets statement B statement statement statement
are used for control and business logic stuff. is true. B is false. B is true. B is false.
Carefully read the question and answer accordingly.
Identify the entry in web.xml that will instruct the container to
compile the JSP when the container starts rather than waiting <load-on- <load-on- <loadonst <load-on-
for the first time. startup> start> artup> Init>

Carefully read the question and answer accordingly.


Which statement is true about Java Server Pages?
1.Used to build dynamic web pages
2.Platform dependent
3.HTML files with special tags that contain java source code to
generates dynamic content 1&3 2&3 1&2 3
Carefully read the question and answer accordingly.
Identify the life cycle method that is called when a JSP is jspDestroyed( jspDestor jspDelete(
destroyed ) y() ) jspStop()
Carefully read the question and answer accordingly.
Which of the following options represents the presentation
logic to provide the data of the model in the MVC design Connecto
pattern? Model View Controller r

Carefully read the question and answer accordingly.


<%! int a=6; %>
<% int a=5; %>
<% int b=3; %> None of
Result is <%= a*b %> Compilation Will Will the listed
What is the result of the above code segment ? error display 18 display 15 options
Carefully read the question and answer accordingly.
It is not necessary to implement your own jspInit or jspDestroy
methods as they are made available within the base class. Say
True or False. TRUE FALSE
Servlets
Servlets are are Servlets Servlets
written in the written in are are
Carefully read the question and answer accordingly. Java the Java written in written in
What language is used to write servlets and JSP? language script the C++ the PHP

Carefully read the question and answer accordingly. jsp_Servi jspServic


Which method of jsp is equivalent to service method of servlet? _jspService() ce() e() service()
Carefully read the question and answer accordingly.
JSP initialization method(life cycle method) is called
immediately before the servlet instance was created TRUE FALSE
Web Web Web
Carefully read the question and answer accordingly. Applicatio Applicatio Applicatio
WAR stands for Web ARchive n ARchive n Request n Report

Translation & loading


compilation,In invoking, invoking,
stantiation, destroy. destroy.
initialization,s Web User
ervice destroy Browser Should
container manages manages None of
Carefully read the question and answer accordingly. manages this this life this life the listed
Which of the following describes JSP life cycle management? life cycle cycle cycle options

Carefully read the question and answer accordingly.


A JSP page services requests as a servlet. Say True or False TRUE FALSE
Carefully read the question and answer accordingly.
The container supplies a ServletConfig reference to the jspInit()
method. Say true or false TRUE FALSE
None of
Carefully read the question and answer accordingly. isELIgnor isErrorPa the listed
Which of the following have default value set to true? session ed ge options

Scriptlet
The The code gets
The init service doGet() no place
method of the method of method of in the
Carefully read the question and answer accordingly. generated generated generated generated
During translation the scriptlet code is copied inside: servlet servlet servlet servlet

Carefully read the question and answer accordingly.


Ronald has observed that his Web application has some HTML
tags or features that all the Web browsers do not support. If the
client's browser does not support the application may or may
not run or may generate undesired output in the Web browser By
of the client. Therefore Ronald wants to identify the type of By modifying
browser and other specific information about the client that creating the web By
sends the request to the Web application before invoking the By security deployme implemen
servlet. Which of the following options will help Ronald provide programming constraint nt ting the
this functionality? filters s descriptor Listeners

Carefully read the question and answer accordingly.


Given a Filter class definition with this method:
21. public void doFilter(ServletRequest request,
22. ServletResponse response,
23. FilterChain chain)
24. throws ServletException, IOException {
25. // insert code here chain.doF request.fo request.d
26. } ilter(reque rward(req oFilter(req
Which code line should you insert at line 25 to properly invoke chain.forward st, uest, uest,
the next filter in the chain, or the target servlet if (request, response) response) response)
there are no more filters? response); ; ; ;
Carefully read the question and answer accordingly.
The child elements of <filter> elements are:
1.<display-name>
2.<init>
3.<config>
4.<context>
5.<filter-class> 1&2 1&3 2&3 2&5

Carefully read the question and answer accordingly.


You are developing a web application using Servlets. You have
to use filters so that the web container intercepts the incoming
requests before it is forwarded to the servlet. Which of the
following method is called for every request intercepted by the
filter? init doFilter destroy doGet

Carefully read the question and answer accordingly. Tag


Which of the following used by container to validate a custom Library
tag in a JSP page? web.xml Xerces Xmlspy Descriptor

Carefully read the question and answer accordingly.


<pref:tag1>
<%= result %>
</pref:tag1> tag
Which of the following are valid for the <body-content> tag of dependan
tag1? JSP empty scriptless t
By using
Carefully read the question and answer accordingly. By using By using path to
How do you declare a tag library within a JSP page to use By using taglib unique the tag
custom tags? scriptlet. directive. variable. handler.
Carefully read the question and answer accordingly.
Mention some of the important functions of Servlet Filter.
1.Security Checks
2.allowing all the users
3.Modifying the request or response 1&2 1&3 2&3 2
Carefully read the question and answer accordingly.
A filter configuration object used by a servlet container to pass
information to a filter during initialization.
State True or False. TRUE FALSE
Carefully read the question and answer accordingly.
Filters can create responses by themselves.
State True or False. FALSE TRUE
Carefully read the question and answer accordingly.
What will be the output for following code?
class Super
{
static void show()
{
System.out.println("super class show method");
}
static class StaticMethods
{
void show()
{
System.out.println("sub class show method");
}
} sub class
public static void main(String[]args) show
{ method
Super.show(); super class super super
new Super.StaticMethods().show(); show method class class
} sub class show show Compilati
} show method method method on Error
Carefully read the question and answer accordingly.
When one method is overridden in sub class the access
specifier of the method in sub class should be equal as method
in super class.
State True or False. FALSE TRUE
Carefully read the question and answer accordingly.
A class can be declared as _______ if you do not want the
class to be subclassed. Using
the __________keyword we can abstract a class from its protected final,interf public,frie final,prote
implementation ,interface ace nd cted
Carefully read the question and answer accordingly.
The constructor of a class must not have a return type. TRUE FALSE

Construct
or is a
special Construct
type of ors
Construct method should be
ors can which called
Constructors be may have explicitly
Carefully read the question and answer accordingly. can be overridde return like
Which of the following are true about constructors? overloaded n. type. methods
Carefully read the question and answer accordingly.
A field with default access specifier can be accessed out side
the package.
State True or False. FALSE TRUE
Carefully read the question and answer accordingly.
________ determines which member of a class can be used Inheritanc Implemen Access
by other classes. specifier e tation specifier
Carefully read the question and answer accordingly.
Which of the following statements are true about Method
Overriding?
I: Signature must be same including return type
II: If the super class method is throwing the exception then
overriding method should throw the same Exception
III: Overriding can be done in same class
IV: Overriding should be done in two different classes with no
relation between the classes I II & IV III I & III
Carefully read the question and answer accordingly.
If display method in super class has a protected specifier then None of
what should be the specifier for the overriding display method protected or protected the listed
in sub class? default or public options private

Carefully read the question and answer accordingly.


What will be the output for following code?
class Super
{
int num=20;
public void display()
{
System.out.println("super class method");
}
}
public class ThisUse extends Super
{
int num;
public ThisUse(int num)
{
this.num=num;
}
public void display()
{
System.out.println("display method");
}
public void Show()
{
this.display();
display();
System.out.println(this.num);
System.out.println(num);
}
public static void main(String[]args) super
{ display display class
ThisUse o=new ThisUse(10); super class method method method
o.Show(); method display display display
} display method method method
} method 20 20 10 10 20 20 10 10
Carefully read the question and answer accordingly.
What will be the output of following code?
class Super2
{
public void display()
{
System.out.println("super class display method");
}
public void exe()
{
System.out.println("super class exe method");
display();
}
}
public class InheritMethod extends Super2
{
public void display()
{

System.out.println("sub class display method");


}

public static void main(String [] args)


{
super
InheritMethod o=new InheritMethod(); class exe
super class method
o.exe(); exe method super
} sub class class None of
display display Compilati the listed
} method method on error options
Carefully read the question and answer accordingly.
Which of the following method is used to initialize the instance Construct Destructo
variable of a class. Class Public or r

If one class is
having
protected
method then
the method is All
available for members Protected
subclass A class of is default
which is can be abstract access
Carefully read the question and answer accordingly. present in declared class are modifier
Which of the following are true about protected access another as by default of a child
specifier? package protected. protected class
Carefully read the question and answer accordingly.
What will be the output for following code?
public class Variables
{
public static void main(String[]args)
{
public int i=10;
System.out.println(i++); None of
} Compilati the listed
} 10 11 on error options
Carefully read the question and answer accordingly.
Constructor of an class is executed each time when an object
of that class is created TRUE FALSE
Carefully read the question and answer accordingly.
Which of the following correctly fits for the definition 'holding Compositi Polymorp
instances of other objects'? Aggregation on Generic hic

Carefully read the question and answer accordingly.


public abstract class Shape
{
private int x;
private int y;
public abstract void draw();
public void setAnchor(int x, int y)
{
this.x = x;
this.y = y;
}
}
Which two classes use the Shape class correctly?
1.public class Circle implements Shape {
private int radius;
}
2.public abstract class Circle extends Shape {
private int radius;
}
3.public class Circle extends Shape {
private int radius;
public void draw();
}
4.public class Circle extends Shape {
private int radius;
public void draw() {/* code here */}
} 1&2 1&3 2&3 3&4

Carefully read the question and answer accordingly.


State whether TRUE or FALSE.
If any method overrides one of it’s super class methods, we
can invoke the overridden method through the this keyword. TRUE FALSE
Carefully read the question and answer accordingly.
What will be the output for following code?
class super3{
int i=10;
public super3(int num){
i=num;
}
}
public class Inherite1 extends super3{
public Inherite1(int a){
super(a);
}
public void Exe(){
System.out.println(i);
}
public static void main(String[]args){
Inherite1 o=new Inherite1(50);
super3 s=new Inherite1(20);
System.out.println(s.i);
o.Exe();
}
} 10 50 20 50 20 10 10 20
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
An abstract class cannot contain non abstract methods TRUE FALSE

Carefully read the question and answer accordingly.


What is the outputof below code:
package p1;
class Parent {
public static void doWork() {
System.out.println("Parent");
}
}
class Child extends Parent {
public static void doWork() {
System.out.println("Child");
}
}
class Test {
public static void main(String[] args) {
Child.doWork();
} Parent
} Child Parent Parent Child Child
Carefully read the question and answer accordingly.
interface A
{
public abstract void aM1(); public
public abstract void aM2(); void
} aM1(){}
interface B extends A public
{ void
public void bM1(); aM2(){}
public void bM2(); public public public
} void void void
public class Demo extends Object implements B bM1(){} bM1(){} aM1(){}
{ public void public public public
} aM1(){} public void void void
In above scenario class Demo must override which methods? void aM2(){} bM2(){} bM2(){} bM2(){}

Carefully read the question and answer accordingly.


State whether TRUE or FALSE.
The below code will compile & provide desired output:
package p1;
interface Bounceable {
void bounce();
void setBounceFactor(int bf);
private class BusinessLogic
{
int var1;
float var2;
double result(int var1,float var2){
return var1*var2;
}
}
}
class Test {
public static void main(String[] args) {
System.out.println(new
Bounceable.BusinessLogic().result(12,12345.22F));
}
} TRUE FALSE

Carefully read the question and answer accordingly.


Choose the correct option.
Statement I: When an abstract class is sub classed, the
subclass should provide the implementation for all the abstract
methods in its parent class. Statement Statement
Statement II: If the subclass does not implement the abstract I is TRUE I is Statement
method in its parent class, then the subclass must also be Statement I & & II is FALSE & I & II are
declared abstract. II are TRUE FALSE II is TRUE FASLE
Carefully read the question and answer accordingly.
Choose the correct option.
Statement I: A subclass inherits all of the “public” and
“protected” members of its parent, no matter what package the
subclass is in. Statement Statement
Statement II: If the subclass of any class is in the same I is TRUE I is Statement
package then it inherits the default access members of the Statement I & & II is FALSE & I & II are
parent. II are TRUE FALSE II is TRUE FASLE

Carefully read the question and answer accordingly.


State whether TRUE or FALSE.
The below code will compile & provide desired output:
package p1;
class Parent {
private int doWork(){
System.out.println("Do Work - Parent");
return 0;
}
}
class Child extends Parent {
public void doWork(){
System.out.println("Do Work - Child");
}
}
class Test{
public static void main(String[] args) {
new Child().doWork();
}
} TRUE FALSE
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
If any class has at least one abstract method you must declare
it as abstract class TRUE FALSE

Carefully read the question and answer accordingly.


public interface Status
{
/* insert code here */ int MY_VALUE = 10;
}
Which are valid on commented line?
1.final
2.static
3.native
4.public 1&2 1&2&3 2&3 1&2&4

Carefully read the question and answer accordingly.


Choose the correct option.
Statement I: When all methods in a class are abstract the class
can be declared as an interface. Statement Statement
Choose the correct option. I is TRUE I is Statement
Statement II: An interface defines a contract for classes to Statement I & & II is FALSE & I & II are
implement the behavior. II are TRUE FALSE II is TRUE FASLE
Carefully read the question and answer accordingly.
abstract class Vehicle
{
public int speed()
{
return 0;
}
}
class Car extends Vehicle
{
public int speed()
{
return 60;
}
}
class RaceCar extends Car
{
public int speed()
{
return 120;
}
}
public class Demo
{
public static void main(String [] args)
{
RaceCar racer = new RaceCar();
Car car = new RaceCar();
Vehicle vehicle = new RaceCar();
System.out.println(racer.speed() + ", " + car.speed()+", " +
vehicle.speed());
}
} 120, 120,
What is the result? 0, 0, 0 120, 60, 0 60,60,60 120

Carefully read the question and answer accordingly.


What will be the output for following code
public class
MethodOverloading {
int m=10,n;
public void div(int a) throws Exception{
n=m/a;
System.out.println(n);
}
public void div(int a,int b) {
n=a/b;
}
public static void main(String[]args) throws Exception{
MethodOverloading o=new MethodOverloading();
o.div(0); It will print
o.div(10,2); ArithmeticExc It will give None of
} eption and Arithmetic It will print the listed
} prints 5 Exception 5 options
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
The below code will compile & provide desired output:
package p1;
abstract class LivingThings{
public abstract void resperate();
interface Living
{
public abstract void walk();
}
}
class Human implements LivingThings.Living{
@Override
public void walk() {
System.out.println("Human Can Walk");
}
}
class Test {
public static void main(String[] args) {
new Human().walk();
}
} TRUE FALSE
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
An overriding method can also return a subtype of the type
returned by the overridden method. TRUE FALSE

Carefully read the question and answer accordingly.


abstract public class Employee
{
protected abstract double getSalesAmount();
public double getCommision() {
return getSalesAmount() * 0.15;
}
}
class Sales extends Employee
{
// insert method here
}
Which two methods, inserted independently, correctly complete
the Sales
class?
1.double getSalesAmount() { return 1230.45; }
2. public double getSalesAmount() { return 1230.45; }
3.private double getSalesAmount() { return 1230.45; }
4.protected double getSalesAmount() { return 1230.45; } 1&2 1&3 2&3 3&4
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
The below code will compile & provide desired output:
package p1;
interface A {
public abstract void methodOne();
}
interface B extends A {
public abstract void methodTwo();
}
class C implements B{
@Override
public void methodTwo() {
System.out.println("Method Two Body");
}
}
class Test {
public static void main(String[] args) {
new C().methodTwo();
}
} TRUE FALSE

Carefully read the question and answer accordingly.


interface B
{
public void bM1();
public void bM2();
}
abstract class A implements B
{
public abstract void aM1();
public abstract void aM2();
public void bM1(){}
}
public class Demo extends A
{ public public All of the
} public void void void listed
In above scenario class Demo must override which methods? aM2(){} aM1(){} bM2(){} options
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
Interface can be used when common functionalities have to be
implemented differently across multiple classes. TRUE FALSE
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
The below code will compile & provide desired output:
package p1;
interface A {
public abstract void methodOne();
}
interface B{
public abstract void methodTwo();
}
interface C{
public abstract void methodTwo();
}
class D implements B,C,A{
public void methodOne(){}
public void methodTwo(){ System.out.println("Method Two");}
}
class Test {
public static void main(String[] args) {
new D().methodTwo();
}
} TRUE FALSE

Carefully read the question and answer accordingly.


public class Person
{ Compilati The code
private String name; on fails will
public Person(String name) { this.name = name; } The equals because This class compile
public boolean equals(Person p) method does the must also as Object
{ NOT properly private implemen class's
return p.name.equals(this.name); override the attribute t the equals
} Object class's p.name hashCode method is
} equals cannot be method overridde
Which statement is true? method. accessed. as well. n.
Carefully read the question and answer accordingly.
Which of the following keywords ensures that a method cannot
be overridden? final protected static abstract
Carefully read the question and answer accordingly.
What is the outputof below code:
package p1;
abstract class LivingThings{
public abstract int walk();
}
class Human extends LivingThings{
@Override
public void walk() {
System.out.println("Human Can Walk");
}
}
class Test {
public static void main(String[] args) {
new Human().walk(); No Output
} Human Can Compilati Runtime will be
} Walk on Error Exception displayed

Carefully read the question and answer accordingly.


What will be the output of following code?
class InterfaceDemo
{
public static void main(String [] args)
{
new DigiCam(){}.doCharge();
new DigiCam(){
public void writeData (String msg)
{
System.out.println("You are Sending: "+msg);
}
}.writeData("MyFamily.jpg");
}//main
}
interface USB
{
int readData();
void writeData(String input);
void doCharge();
}
abstract class DigiCam implements USB
{
public int readData(){ return 0;}
public void writeData(String input){}
public void doCharge()
{ DigiCam do
System.out.println("DigiCam do Charge"); Charge You DigiCam
} are Sending: Compilati do Runtime
} MyFamily.jpg on Error Charge Error
Carefully read the question and answer accordingly.
What is the output of below code:
package p1;
public class Test {
public static void main(String[] args) {
Test t1 = new Test();
Test t2 = new Test();
if (!t1.equals(t2))
System.out.println("they're not equal");
if (t1 instanceof Object) they're
System.out.println("t1's an Object"); not equal No Output
} they're not t1's an t1's an Will be
} equal Object Object Displayed

Carefully read the question and answer accordingly.


State whether TRUE or FALSE.
A concrete class can extend more than one super class
whether that super class is either concrete or abstract class TRUE FALSE

Carefully read the question and answer accordingly.


public class Client1
{
public static void main(String [] args)
{
PenDrive p;
PenDrive.Vendor v1=new PenDrive.Vendor("WD",500);
System.out.println(v1.getName());
System.out.println(v1.getPrice());
}
}
class PenDrive
{
static class Vendor
{
String name;
int price;
public String getName(){ return name;}
public int getPrice(){ return price;}

Vendor(String name,int price)


{
this.name=name;
this.price=price;
} Class cannot
} be defined
} inside Runtime Compile
What will be the output of the given code? another class Error. WD 500 Error.
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
The super() call can only be used in constructor calls and not
method calls. TRUE FALSE
Carefully read the question and answer accordingly.
Abstract classes can be used when
Statement I: Some implemented functionalities are common Statement Statement
between classes I is TRUE I is Statement
Statement II: Some functionalities need to be implemented in Statement I & & II is FALSE & I & II are
sub classes that extends the abstract class II are TRUE FALSE II is TRUE FASLE

Carefully read the question and answer accordingly.


class InterfaceDemo
{
public static void main(String [] args)
{
DigiCam cam1=new DigiCam();
cam1.doCharge();
}//main
}
interface USB
{
int readData();
boolean writeData(String input);
void doCharge();
}
class DigiCam implements USB
{
public int readData(){ return 0;} Code will not Code will
public boolean writeData(String input){ return false; } compile due Code will compile
void doCharge(){ return;} to weaker Compile but wont
} access without print any Runtime
Which of the following is correct with respect to given code? privilege. any Error message Exception
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
Object class provides a method named getClass() which
returns runtime class of an object. TRUE FALSE

Carefully read the question and answer accordingly.


What will be the output for following code?
public class VariableDec1
{
public static void main(String[]args)
{
int I=32;
char c=65;
char a=c+I;
System.out.println(a); None of
} compilatio the listed
} 97 a n error options

Carefully read the question and answer accordingly.


Which of the following code snippets make objects eligible for
Garbage Collection?
Statement A: String s = "new string"; s = s.replace('e', '3');
Statement B:String replaceable = "replaceable"; StringBuffer Both Neither
sb = new StringBuffer(replaceable);replaceable = null; sb = Statements A Statement Statement Statement
null; and B A alone B alone s A nor B
Carefully read the question and answer accordingly. scope none of
Members of the classs are accessed by _________ operator address dot resolution these
System.s
Carefully read the question and answer accordingly. etGarbag
Which of the following is the correct syntax for suggesting that eCollectio System.o System.g
the JVM to performs garbage collection? System.free(); n(); ut.gc(); c();

Carefully read the question and answer accordingly.


What will be the output for following code?
public class VariableDec
{
public static void main(String[]args)
{
int x = 1;
if(x>0 )
x = 3;
switch(x)
{
case 1: System.out.println(1);
case 0: System.out.println(0);
case 2: System.out.println(2);
break;
case 3: System.out.println(3);
default: System.out.println(4);
break;
}
} Compilati
} 102 34 4 on error
Carefully read the question and answer accordingly.
_____________ Operator is used to create an object. class new print main
Carefully read the question and answer accordingly. implemen
Which of the following is not the Java keyword? extends ts throwed Integer

Carefully read the question and answer accordingly.


Find the keyword(s) which is not used to implement exception try catch finally access
Carefully read the question and answer accordingly.
The ++ operator postfix and prefix has the same effect TRUE FALSE

Carefully read the question and answer accordingly.


What will be the output for following code?
public class Operators
{
public static void main(String[]args)
{
int i=12;
int j=13;
int k=++i-j--;
System.out.println(i);
System.out.println(j);
System.out.println(k);
}
} 12,12,-1 13,12,0 13,13,0 12,13,-1
Carefully read the question and answer accordingly.
What will be the output for following code?
public class Variabledec {
public static void main(String[]args){
boolean x = true;
int a;
if(x) a = x ? 2: 1;
else a = x ? 3: 4;
System.out.println(a);
}
} 1 3 4 2

Carefully read the question and answer accordingly.


What is the correct structure of a java program?
I: import statement
II: class declaration
III: package statement I->III->II- I->III->IV- I->II->III-
IV: method,variable declarations III->I->II->IV. >IV >II >IV
Carefully read the question and answer accordingly.
Garbage collector thread is a daemon thread.
State True or False. TRUE FALSE
Carefully read the question and answer accordingly.
Garbage collection guarantee that a program will not run out of
memory. State True or False. FALSE TRUE

Carefully read the question and answer accordingly.


Statement A:finalize will always run before an object is garbage Statement Statement
collected Both A is true A is false Both
Statement B:finalize method will be called only once by the Statements A and and Statement
garbage collector and B are Statement Statement s A and B
which of the following is true? true B is false B is true are false

Carefully read the question and answer accordingly.


After which line the object initially referred by str ("Hello" String
object) is eligible for garbage collection?
class Garbage{
public static void main(string[]args){
line 1:String str=new String("Hello");
line 2. String str1=str;
line 3.str=new String("Hi");
line 4.str1=new String("Hello Again");
5.return;
}
} line 3 line 4 line 5 line 1

Carefully read the question and answer accordingly.


How can you force garbage collection of an object?
1.Garbage collection cannot be forced
2.Call System.gc().
3.Call Runtime.gc().
4. Set all references to the object to new values(null, for
example). Option 2 Option 3 Option 1 Option 4
Carefully read the question and answer accordingly.
Which of the below is invalid state of thread? Runnable Running Dead Blocked
Carefully read the question and answer accordingly.
Predict the output of below code:
package p1;
class MyThread extends Thread {
public void run(int a) {
System.out.println("Important job running in MyThread");
}
public void run(String s) {
System.out.println("String in run");
}
}
class Test { Important
public static void main(String[] args) { job
MyThread t1=new MyThread(); Important running in
t1.start(); job MyThread
} running in String in String in
} Compile Error MyThread run run

Requires
less
overhead
Support s
Reduce parallel compared
response operation Increase to
Carefully read the question and answer accordingly. time of of system multitaski
Which of these is not a benefit of Multithreading? process. functions. efficiency. ng.

The delay
Carefully read the question and answer accordingly. between
You have created a TimeOut class as an extension of Thread, “Start!” If “Time’s
the purpose of which is to print a “Time’s Over” message if the being Over!” is
Thread is not interrupted within 10 seconds of being started. printed printed,
Here is the run method that you have coded: and you can
public void run() { Exactly “Time’s be sure
System.out.println(“Start!”); 10 Over!” will that at
try { Exactly 10 seconds be 10 least 10
Thread.sleep(10000); seconds after after the seconds seconds
System.out.println(“Time’s Over!”); the start “Start!” is plus or have
} catch (InterruptedException e) { method is printed, minus elapsed
System.out.println(“Interrupted!”); called, “Time’s one tick of since
} “Time’s Over!” will the “Start!”
}Given that a program creates and starts a TimeOut object, Over!” will be be system was
which of the following statements is true? printed. printed. clock. printed.
Synchroni
Carefully read the question and answer accordingly. Synchroni Synchroni zed
Synchronization is achieved by using which of the below Synchronized zed zed abstract
methods blocks methods classes classes
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
The below code will compile & provide desired output:
package p1;
class MyThread extends Thread {
public void run() {
System.out.println("Important job running in MyThread");
}
public void run(String s) {
System.out.println("String in run is " + s);
}
}
class Test {
public static void main(String[] args) {
MyThread t1=new MyThread();
t1.start();
}
} TRUE FALSE

Carefully read the question and answer accordingly.


What will be the output of below code:
package p1;
class MyThread extends Thread {
public void run() {
System.out.println("Important job running in MyThread");
}
}
class Test {
public static void main(String[] args) {
MyThread t1=new MyThread(); Important
t1.run(); job Non of
} running in Runtime the
} Compile Error MyThread Exception options
Carefully read the question and answer accordingly.
public class Threads
{
public static void main (String[] args)
{
new Threads().go();
}
public void go()
{
Runnable r = new Runnable()
{
public void run()
{
System.out.print("Run");
}
};

Thread t = new Thread(r); The code


t.start(); The code executes
t.start(); executes normally,
} An exception normally but
} is thrown at and prints nothing is Compilati
What will be the result? runtime. "Run". printed. on fails.
Carefully read the question and answer accordingly.
Inter thread communication is achieved using which of the all the
below methods? wait() notify() notifyAll() options
boolean
Carefully read the question and answer accordingly. void getPriority boolean
Which of these is not valid method in Thread class void run() start() () isAlive()
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
Threads are small process which run in shared memory space
within a process. TRUE FALSE

Carefully read the question and answer accordingly. Statement BOTH BOTH
Which of the following statements are true? 2 is TRUE Statement Statement
Statement1: When a thread is sleeping as a result of sleep(), it Statement1 is but 1& 1&
releases its locks. TRUE but Statement Statement Statement
Statement2: The Object.wait() method can be invoked only Statement2 is 1 is 2 are 2 are
from a synchronized context. FALSE. FALSE. TRUE. FALSE.

Carefully read the question and answer accordingly.


Which two statements are true?
1.It is possible for more than two threads to deadlock at once.
2.The JVM implementation guarantees that multiple threads
cannot enter into a
deadlocked state.
3.Deadlocked threads release once their sleep() method's
sleep duration has expired.
4.If a piece of code is capable of deadlocking, you cannot
eliminate the possibility of
deadlocking by inserting
invocations of Thread.yield(). 1&2 1&3 2&3 1&4
Carefully read the question and answer accordingly.
public class TestDemo implements Runnable
{
public void run()
{
System.out.print("Runner");
}
public static void main(String[] args)
{
Thread t = new Thread(new TestDemo());
t.run(); The code
t.run(); You cannot An executes
t.start(); call run() exception The code and prints
} method using is thrown executes "RunnerR
} Thread class at and prints unnerRun
What will be the result? object. runtime. "Runner". ner".

Carefully read the question and answer accordingly.


class Background implements Runnable{ Compilati
int i = 0; It will on will
public int run(){ compile cause an
while (true) { and error
i++; It will compile calling because
System.out.println("i="+i); and the run start will The code while
} method will print out will cause cannot
return 1; print out the the an error take a
} increasing increasing at compile parameter
}//End class value of i. value of i. time. of true.
Carefully read the question and answer accordingly.
Java provides ____ ways to create Threads. One Two Three Four

Carefully read the question and answer accordingly.


As per the below code find which statements are true.
public class Test { In Line 4
public static void main(String[] args) { null
Line 1: ArrayList<String> myList=new List<String>(); pointer
Line 2: String string = new String(); exception Line 4
Line 3: myList.add("string"); Line 2 will occur has
Line 4: int index = myList.indexOf("string"); has run as String neither
System.out.println(index); Line 1 has time string error nor
} compilation exception contains exception
} error s null value s.
Carefully read the question and answer accordingly.
The ArrayList<String> is immutable. TRUE FALSE
Carefully read the question and answer accordingly.
Map is the super class of Dictionary class? TRUE FALSE
Carefully read the question and answer accordingly.
Method keySet() in Map returns a set view of the keys
contained in that map.
State True or False. TRUE FALSE
Carefully read the question and answer accordingly.
Is "Array" a subclass of "Collection" ? TRUE FALSE
Carefully read the question and answer accordingly.
What will be the output for following code?
public class Compare
{
public static void main(String[]args)
{
String s=new String("abc");
String s1=new String("abc");
System.out.println(s.compareTo(s1)); None of
} the listed
} True False options
Carefully read the question and answer accordingly.
The LinkedList class supports two constructors. TRUE FALSE

Carefully read the question and answer accordingly.


Consider the following statements about the Map type Objects:
Statement A: Changes made in the set view returned by Statement Statement
keySet() will be reflected in the original map. Both A is true A is false Both
Statement B: All Map implementations keep the keys sorted. Statements A and and Statement
Which of the following option is true regarding the above and B are Statement Statement s A and B
statements? true B is false B is true are false
Carefully read the question and answer accordingly. list
what is the way to iterate over the elements of a Map for loop Iterator foreach Iterator

Creates a Creates a Creates a


Date Date Date
object object object
with '01- with with
Carefully read the question and answer accordingly. 01-1970 current current
Consider the following partial code: Creates a 12:00:00 date and date
java.util.Date date = new java.util.Date(); Date object AM' as time as alone as
Which of the following statement is true regarding the above with 0 as default default default
partial code? default value value value value

Carefully read the question and answer accordingly.


Consider the following list of code:
A) Iterator iterator = hashMap.keySet().iterator();
B) Iterator iterator = hashMap.iterator();
C) Iterator iterator = hashMap.keyMap().iterator();
D) Iterator iterator = hashMap.entrySet().iterator();
E) Iterator iterator = hashMap.entrySet.iterator();
Assume that hashMap is an instance of HashMap type
collection implementation.
Which of the following option gives the correct partial code
about getting an Iterator to the HashMap entries? A B C D
Carefully read the question and answer accordingly.
What is the return type of next() in Iterator? boolean void Object String
Carefully read the question and answer accordingly.
foreach loop is the only option to iterate over a Map TRUE FALSE
Carefully read the question and answer accordingly.
Which of the following are not List implementations?
1.Vector
2.Hashtable
3.LinkedList
4.Properties 1&2 1&3 2&3 1&4

Carefully read the question and answer accordingly.


Consider the following Statements:
Statement A: The Iterator interface declares only two methods:
hasMoreElements and nextElement. Statement Statement
Statement B: The ListIterator interface extends both the List Both the A is true A is false Both the
and Iterator interfaces. Statements A and and statement
Which of the following option is correct regarding above given and B are Statement Statement s A and B
statements? true B is false B is true are false.

Carefully read the question and answer accordingly.


State TRUE or FALSE.
line 1: public class Test {
line 2: public static void main(String[] args) {
line 3: Queue queue = new LinkedList();
line 4: queue.add("Hello");
line 5: queue.add("World");
line 6: List list = new ArrayList(queue);
line 7: System.out.println(list); }
line 8: }
Above code will give run time error at line number 3. TRUE FALSE
Carefully read the question and answer accordingly.
Iterator i= new HashMap().entrySet().iterator();
is this correct declaration TRUE FALSE
Carefully read the question and answer accordingly.
Iterator is having previous() method.
State True or False. FALSE TRUE

Carefully read the question and answer accordingly.


List<Integer> newList=new ArrayList<integer>(); will Above
statement create a new object of Array list successfully ? TRUE FALSE
Carefully read the question and answer accordingly.
Which collection class allows you to associate its elements with java.util.A java.util.D java.util.H
key values java.utill.Map rrayList ictionary ashMap
Carefully read the question and answer accordingly.
Under  java.util package we have "Collections" as Class and
"Collection" as Interface  TRUE FALSE
Carefully read the question and answer accordingly.
The add method of Set returns false if you try to add a
duplicate element. TRUE FALSE
Carefully read the question and answer accordingly.
Is this true or false. Map interface is derived from the Collection
interface. TRUE FALSE
Carefully read the question and answer accordingly.
LinkedList represents a collection that does not allow duplicate
elements. TRUE FALSE
Carefully read the question and answer accordingly.
What is the data type of m in the following code?
import java.util.*;
public class set1
{
public static void main(String [] args)
{
Set s=new HashSet();
s.add(20);
s.add("abc");
for( _____ m:s)
System.out.println(m);
}
} int String Object set1
Carefully read the question and answer accordingly.
Which of these interface(s) are part of Java’s core collection SortedQu
framework? List Set SortedList eue
Carefully read the question and answer accordingly.
When comparable interface is used which method should be compareT compare
overridden? comparator compare o With
Carefully read the question and answer accordingly. Compara
TreeSet uses which two interfaces to sort the data Serializable SortTable SortedSet ble

The
The elements
elements in the
The elements in the collection
in the collection are HashSet
collection are are accessed allows at
accessed guarantee using a most one
Carefully read the question and answer accordingly. using a non- d to be unique null
Which statement are true for the class HashSet? unique key. unique key. element
Carefully read the question and answer accordingly.
Enumeration is having remove() method.
State True or False. FALSE TRUE

Carefully read the question and answer accordingly.


Consider the following code:
01 import java.util.Set;
02 import java.util.TreeSet;
03
04 class TestSet {
05 public static void main(String[] args) {
06 Set set = new TreeSet<String>();
07 set.add("Green World");
08 set.add(1); Prints the
09 set.add("Green Peace"); output
10 System.out.println(set); Prints the [Green
11 } output [Green Compilati World,
12 } World, 1, on error Throws Green
Which of the following option gives the output for the above Green Peace] at line no Runtime Peace] at
code? at line no 9 8 Exception line no 9
Carefully read the question and answer accordingly.
What will be the output for following code?
public class collection1{
public static void main(String[]args){
Collection c=new ArrayList();
c.add(10);
c.add("abc");
Collection l=new HashSet();
l.add(20);
l.add("abc");
l.add(30);
c.addAll(l);
c.removeAll(l);
System.out.println( c );
} Compilati
} [10,abc] [10] on error [abc]
Carefully read the question and answer accordingly. Sorted
Which of these are interfaces in the collection framework Hash Map Array List Collection Map

The The
ListIterato ListIterato
The r interface r interface
The Iterator ListIterato provides provides
interface r interface the ability forward
declares only extends to and
three both the determine backward
methods: List and its iteration
Carefully read the question and answer accordingly. hasNext, next Iterator position in capabilitie
Which of the following are true statements? and remove. interfaces the List. s.

all
implemen
All All tations
implemen implemen are
All tations tations immutabl
implementatio support are e and
Carefully read the question and answer accordingly. ns are having serializabl supports
which are the Basic features of implementations of interfaces in unsynchroniz null e and duplicates
Collections Framework in java? ed elements. cloneable data

Carefully read the question and answer accordingly.


Which of the following are synchronized?
1.Hashtable
2.Hashmap
3.Vector
4.ArrayList 1&2 1&3 2&3 1&4
Carefully read the question and answer accordingly.
What will be the output for following code?
import java.util.*;
public class StringTokens
{
public static void main(String[]args)
{
String s="India is a\n developing country";
StringTokenizer o=new StringTokenizer(s);
System.out.println(o.countTokens()); None of
} the listed
} 4 5 6 options
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
StringBuilder is not thread-safe unlike StringBuffer TRUE FALSE

Carefully read the question and answer accordingly.


What will be the output for following code?
public class StringCompare{
public static void main(String[]args){
if("string"=="string")
System.out.println("both strings are equal");
else both
System.out.println("both strings are not equal"); strings
} both strings are not compilatio Runtime
} are equal equal n error error
Carefully read the question and answer accordingly.
endsWith() member methods of String class creates new String
object. State True or False TRUE FALSE

Carefully read the question and answer accordingly.


What will be the output for following code?
public class CompareStrings{
public static void main(String[]args){
String a=new String("string");
String s=new String("string");
if(a==s)
System.out.println("both strings are equal"); Strings
else both cannot be
System.out.println("both strings are not equal"); strings compare
} both strings are not compilatio using ==
} are equal equal n error operator
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
String s = new String(); is valid statement in java TRUE FALSE

Carefully read the question and answer accordingly.


What is the output of below code:
package p1;
public class Hackathon {
public static void main(String[] args) {
String x = "Java";
x.concat(" Rules!");
System.out.println("x = " + x);
} x = Java
} Rules x = Java x = Rules Error
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
StringTokenizer implements the Enumeration interface TRUE FALSE
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
The APIS of StringBuffer are synchronized unlike that of
StringBuilder TRUE FALSE

Carefully read the question and answer accordingly.


What is the output of below code:
package p1;
public class Hackathon {
public static void main(String[] args) {
String x = "Java";
x.toUpperCase();
System.out.println("x = " + x);
}
} x = JAVA x="" x = Java x="JAVA"

Carefully read the question and answer accordingly.


Consider the following code snippet:
String thought = "Green";
StringBuffer bufferedThought = new StringBuffer(thought);
String secondThought = bufferedThought.toString();
System.out.println(thought == secondThought);
Which of the following option gives the output of the above
code snippet? TRUE FALSE

Carefully read the question and answer accordingly.


Choose the correct option.
Statement I: StringBuilder offers faster performance than Statement Statement
StringBuffer I is TRUE I is Statement
Statement II: All the methods available on StringBuffer are also Statement I & & II is FALSE & I & II are
available on StringBuilder II are TRUE FALSE II is TRUE FASLE
Carefully read the question and answer accordingly. Comparing Searching Extracting All of
String class contains API used for strings strings strings above

Carefully read the question and answer accordingly.


Choose the correct option. Statement Statement
Statement I: StringBuffer is efficient than “+” concatenation I is TRUE I is Statement
Statement II: Using API’s in StringBuffer the content and length Statement I & & II is FALSE & I & II are
of String can be changed which intern creates new object. II are TRUE FALSE II is TRUE FASLE
Carefully read the question and answer accordingly.
State whether TRUE or FALSE.
String class do not provides a method which is used to
compare two strings lexicographically. TRUE FALSE

Carefully read the question and answer accordingly.


What will be the output for following code?
public class CompareStrings{
public static void main(String[]args){
if(" string ".trim()=="string")
System.out.println("both strings are equal"); Strings
else both cannot be
System.out.println("both strings are not equal"); strings compare
} both strings are not compilatio using ==
} are equal equal n error operator
Carefully read the question and answer accordingly.
What will be the output for following code?
public class StringBuffer1
{
public static void main(String[]args)
{
StringBuffer s1=new StringBuffer("welcome");
StringBuffer s2=new StringBuffer("welcome");
System.out.println(s1.equals(s2));
System.out.println(s1.equals(s1));
}
} true false false true true true false false

Carefully read the question and answer accordingly.


What will be the output for following code?
import java.io.*;
public class Exception1
{
public static void main(String[]args)
{
System.out.println("A");

try
{
}
catch(IOException t)
{
System.out.println("B");
}

System.out.println("C");
} Compile time Runtime
} error A A,C error

Carefully read the question and answer accordingly.


What will be the output of the program?
public class Test {
public static void aMethod() throws Exception {
try {
throw new Exception();
} finally {
System.out.print("finally");
}
}
public static void main(String args[]) {
try {
aMethod();
} catch (Exception e) {
System.out.print("exception ");
}
System.out.print("finished"); /* Line 24 */ finally
} exception Compilati exception
} finished on fails finally finished
Carefully read the question and answer accordingly.
At Point X in below code, which code is necessary to make the
code compile?
public class Test
{
class TestException extends Exception {}
public void runTest() throws TestException {}
public void test() /* Point X */
{ No code
runTest(); throws catch is
} RuntimeExce ( Exceptio throws necessary
} ption ne) Exception .

finally
Carefully read the question and answer accordingly. block will
If you put a finally block after a try and its associated catch be always
blocks, then once execution enters the try block, the code in An exception The use executed
that finally block will definitely be executed except in some arising in the of in any The death
circumstances.select the correct circumstance from given finally block System.e circumsta of the
options: itself xit() nces. thread

Carefully read the question and answer accordingly.


What will be the output of the below code?
public class Test {
public static void main(String[] args) {
int a = 5, b = 0, c = 0;
String s = new String();
try {
System.out.print("hello ");
System.out.print(s.charAt(0));
c = a / b;
} catch (ArithmeticException ae) {
System.out.print(" Math problem occur"); hello
} catch (StringIndexOutOfBoundsException se) { Math
System.out.print(" string problem occur"); problem
} catch (Exception e) { occur
System.out.print(" problem occurs"); string
} finally { hello 0 problem hello
System.out.print(" stopped"); Math occur string
} problem problem problem
} hello 0 occur occurs occur
} stopped stopped stopped stopped
Carefully read the question and answer accordingly.
Within try block if System.exit(0) is called then also finally block
is going to be executed.
State True or False. FALSE TRUE

Carefully read the question and answer accordingly.


Which of the following are checked exceptions?
1.ClassNotFoundException
2.InterruptedException
3.NullPointerException
4.ArrayIndexOutOfBoundsException 1&2 1&3 2&3 1&4
FileNotFin
Carefully read the question and answer accordingly. Throwabl RunTime dExceptio
which of these are the subclass of Exception class IOException e Exception n

RunTime
Exception
are the
exception
Runtime s which
exceptions forces the
need not be Runtime programm
explicitly exception er to
caught in try s include catch
catch block arithmetic RuntimeE them
as it can exception xception explicitly
occur s, pointer is a class in try-
Carefully read the question and answer accordingly. anywhere in a exception of I/O catch
what are true for RuntimeException program. s exception block

Carefully read the question and answer accordingly.


What will be the output of following code?
try
{
System.out.println("Executing try");
}
System.out.println("After try");
catch (Exception ex) Executing try Executing
{ After try try Compile
System.out.println("Executing catch"); Executing Runtime Time Runtime
} catch Exception Exception Exception

Carefully read the question and answer accordingly.


Consider the following code:
class MyException extends Throwable { }
public class TestThrowable {
public static void main(String args[]) {
try {
test();
} catch(Throwable ie) {
System.out.println("Exception");
}
} Compiler Compile Run time
time error time error error
static void test() throws Throwable { User Cannot test()
throw new MyException(); defined use method
} exception Throwabl does not
} s should e to catch throw a
Which of the following option gives the output for the above Prints extend the Throwabl
code? Exception Exception exception e instance

Array
Index Out
Of ClassNot Number
Carefully read the question and answer accordingly. Class Cast Bounds FoundExc Format
which are the Unchecked exceptions Exception Exception eption Exception
Carefully read the question and answer accordingly.
What will be the output for following code?
public class Exception1
{
public static void main(String[]args)
{
System.out.println("A");
try
{
System.exit(0);
}catch(Exception e)
{
System.out.println("B");
}
System.out.println("C");
} None of
} Compilati the listed
} A,C A on error options

NoClassD
efFoundE
rror
means
that the
class was
found by
the
ClassLoa
A der
ClassNotFou however
ndException when
is thrown trying to NoClassD
when the load the efFoundE
reported class, it rror is a
class is not ran into subClass
found by the an error of
ClassLoader reading ClassNot None of
Carefully read the question and answer accordingly. in the the class FoundExc the
Which is/are true among given statements CLASSPATH. definition. eption options
Carefully read the question and answer accordingly.
What will be the output for following code?
public class Exe3
{
public static void main(String[]args)
{
try
{
int i=10;
int j=i/0;
return;
}catch(Exception e)
{
System.out.println("welcome");
}
System.out.println("error");
}
}
1.welcome
2.error
3.compilation error 1&2 1&2&3 1&3 2

after
switching
from try
block to
catch catch
block is block the
if not control
exception mandate never
occurs, always come
control only back to
Try block switches finally try block
always to followed to
needed a following by try can execute
Carefully read the question and answer accordingly. catch block first Catch be rest of the
which are true for try block followed block executed code
Carefully read the question and answer accordingly.
What will be the output of following code?
public class Exception1{
public static void main(String args[]) {
int i=1, j=1;
try {
i++;
j--;
if(i/j > 1)
i++;
} catch(ArithmeticException e) {
System.out.println(0);
} catch(ArrayIndexOutOfBoundsException e) {
System.out.println(1);
} catch(Exception e) {
System.out.println(2);
}
finally {
System.out.println(3);
}
System.out.println(4);
}
}
1.0
2.1
3.3
4.4. 1&2 1&2&3 1&3&4 1&2&4

Carefully read the question and answer accordingly.


Consider the following code:
1 public class FinallyCatch { Shows
2 public static void main(String args[]) { Shows unhandle
3 try { unhandled d
4 throw new java.io.IOException(); exception exception Demands Demands
5 } type type a finally a finally
6 } IOException IOExcepti block at block at
7 } at line on at line line line
Which of the following is true regarding the above code? number 4 number 5 number 4 number 5
Carefully read the question and answer accordingly. FileNotFo NullPointe
Which of the following exception is not mandatory to be undExcep SQLExce rExceptio
handled in code? IOException tion ption n
Carefully read the question and answer accordingly.
What will be the output for following code?
public class Exception1{
public static void main(String args[]) {
int i=1, j=1;
try {
i++;
j--;
if(i/j > 1)
i++;
} catch(Exception e) {
System.out.println(2);
} catch(ArithmeticException e) {
System.out.println(0);
}
finally {
System.out.println(3);
}
} compilatio
} 2 3 n error
Carefully read the question and answer accordingly.
select true or false . Statement : Throwable is the super class
of all exceptional type classes. TRUE FALSE
Carefully read the question and answer accordingly.
try and throws keywords are used to manually throw an
exception? TRUE FALSE
Carefully read the question and answer accordingly.
RuntimeException is the superclass of those exceptions that
can be thrown during the normal operation of the Java Virtual
Machine. TRUE FALSE

Carefully read the question and answer accordingly.


Which of the following statement is true regarding
implementing user defined exception mechanisms? Statement Statement
Statement A: It is valid to derive a class from Both A is true A is false Both
java.lang.Exception Statements A and and Statement
Statement B: It is valid to derive a class from and B are Statement Statement s A and B
java.lang.RuntimeException true B is false B is true are false

An exception Both
which is not A catch catch
handled by a block can block and
catch block have finally
will be another block can
Carefully read the question and answer accordingly. handled by try block throw All of the
Which of the following statement is true regarding try-catch- subsequent nested exception listed
finally? catch blocks inside s options

Carefully read the question and answer accordingly.


Which of these keywords are a part of exception handling? try final thrown catch
Carefully read the question and answer accordingly.
Error is the sub class of Throwable TRUE FALSE
Carefully read the question and answer accordingly.
Which of these keywords is used to explicitly throw an
exception? try finally throw throwable

Carefully read the question and answer accordingly.


is it valid to place some code in between try and catch blocks. TRUE FALSE

Checked
exception
s are the
object of
the
Exception
class or All
any of its runtime
A checked error and subclasse exception
exception is a checked s except s are
subclass of exception Runtime checked
Carefully read the question and answer accordingly. throwable s are Exception exception
which are correct for checked exceptions class same. class. s
Carefully read the question and answer accordingly.
Try can be followed with either catch or finally.
State True or False. TRUE FALSE
Carefully read the question and answer accordingly. RuntimeE
Which is the super class for Exception and Error? Throwable throws throw xception
Carefully read the question and answer accordingly.
The finally block always executes when the try block exits.
State True or False. TRUE FALSE

Carefully read the question and answer accordingly.


Select two runtime exceptions.
1.SQLException
2.NullPointerException
3.FileNotFoundException
4.ArrayIndexOutOfBoundsException
5.IOException 1&2 1&5 2&3 1&4
Carefully read the question and answer accordingly.
Propagating exceptions across modules is not possible without
throw and throws keyword. State True or False. TRUE FALSE
Carefully read the question and answer accordingly.
What will be the output for following code?
public class Exe3 {
public static void main(String[]args){
try{
int i=10;
int j=i/0;
return;
}catch(Exception e){
try{
System.out.println("welcome");
return;
}catch(Exception e1){
}
System.out.println("error");
} None of
} compilatio the listed
} welcome error n error options

Carefully read the question and answer accordingly.


What will be the output for following code?
class super5{
void Get()throws Exception{
System.out.println("IOException");
}
}
public class Exception2 extends super5{
public static void main(String[]args){
super5 o=new super5();
try{
o.Get();
}catch(IOException e){
} None of
} compilatio Runtime the listed
} IOException n error error options
Carefully read the question and answer accordingly.
Serialization is representing object in a sequence of bytes.
State True or False. TRUE FALSE
Carefully read the question and answer accordingly.
Serialization is JVM independent.State True or False. TRUE FALSE
Carefully read the question and answer accordingly. statement statement statement statement
Statement 1:static variables can be serialized 1:true 1:false 1:false 1:true
Statement2:transient variables cannot be serialized statement2:tr statement statement statement
which of the following is true? ue 2:true 2:false 2:false
setting up
BufferedO
utputStre
aman , an
applicatio As bytes
n can from the
write stream
bytes to are read
the or
underlyin skipped,
g output the
stream internal
without buffer is
necessaril refilled as
y causing necessary
a call to from the
BufferedOutp the contained
utStream underlyin input
class is a g system stream,
Carefully read the question and answer accordingly. member of for each it has many
select the correct statements about BufferedOutputStream Java.io byte flush() bytes at a
class package written. method time.
Carefully read the question and answer accordingly.
DataInputStream is not necessarily safe for multithreaded
access. TRUE FALSE
Carefully read the question and answer accordingly. None of
Which of the following is a marker interface used for object Serializab Externaliz the listed
serialization? Runnable le able options
Carefully read the question and answer accordingly.
InputStream is the class used for stream of characters.
State True or False. FALSE TRUE
Carefully read the question and answer accordingly.
BufferedWriter constructor CAN ACCEPT Filewriter Object as a
parameter.
State True or False. TRUE FALSE

Carefully read the question and answer accordingly. StringRea


Which of these class are the member class of java.io package? ObjectInput der File String

Carefully read the question and answer accordingly. ObjectInp ObjectFilt


Which of these interface is not a member of java.io package? DataInput ut er FileFilter

Carefully read the question and answer accordingly.


Which of the following are abstract classes?
1.Reader
2.InputStreamReader
3.InputStream
4.OutputStream 1&2 1&2&3 1&3&4 1&2&4
Carefully read the question and answer accordingly.
An ObjectInputStream deserializes objects previously written
using an ObjectOutputStream.
State True or False. TRUE FALSE
Carefully read the question and answer accordingly.
The InputStream.close() method closes this stream and
releases all system resources TRUE FALSE
Carefully read the question and answer accordingly.
State TRUE or FALSE.
getParent() gives the parent directory of the file and isFile()
Tests whether the file denoted by the given abstract pathname
is a normal file. TRUE FALSE
Carefully read the question and answer accordingly.
InputStreamReader is sub class of FilterReader. TRUE FALSE
Carefully read the question and answer accordingly.
isFile() returns true if called on a file or when called on a
directory TRUE FALSE

Carefully read the question and answer accordingly.


What is the output of this program?
1. import java.io.*;
2. class files {
3. public static void main(String args[]) {
4. File obj = new File("/java/system");
5. System.out.print(obj.getName()); /
6. } java/syste compilatio
7. } java/system m system n error
Carefully read the question and answer accordingly.
Which of these class are related to input and output stream in OutputStr
terms of functioning? File Writer Reader eam
Carefully read the question and answer accordingly.
The ______ statement is used inside the switch to terminate a
Statement sequence break Jump exit goto
Carefully read the question and answer accordingly. 10.9873.7 Compilati
The result of 10.987+”30.765” is _________________. 10.98730.765 65 on error 10.987
Both by
Carefully read the question and answer accordingly. by value & none of
Data can be passed to the function ____ by value reference reference these
Carefully read the question and answer accordingly.
_____________ is a multi way branch statement switch continue break label
Carefully read the question and answer accordingly.
Which of the following is a loop construct that will always be do ….
executed once? switch for while While

Carefully read the question and answer accordingly.


What will be the output for following code?
public class While {
static int i;
public static void main(String[]args){
System.out.println(i);
while(i<=5){
i++;
}
System.out.println(i);
} compilation
} error 0,6 6,0 0,5
The number
of bytes is
Carefully read the question and answer accordingly. compiler
What is the number of bytes used by Java primitive long dependent 2 4 8
Carefully read the question and answer accordingly.
We can use Wrapper objects of type int, short, char in switch
case.
State True or False. TRUE FALSE

Carefully read the question and answer accordingly. The The The
What happens when the following code is compiled and run. number 1 number 2 number 3
Select the one correct The class gets gets gets
answer. compiles and printed printed printed
for(int i = 1; i < 3; i++) runs, but with with with
for(int j = 3; j >= 1; j--) does not print Assertion Assertion Assertion
assert i!=j : i; anything. Error Error Error

Carefully read the question and answer accordingly.


What will be the output for following code?
public class WrapperClass12
{
public static void main(String[]args)
{
Boolean b=true;
boolean a=Boolean.parseBoolean("tRUE");
System.out.println(b==a);
} Compilati Runtime
} True False on error Exception

Carefully read the question and answer accordingly.


What will be the output for following code?
public class WrapperClass1 {
public static void main(String[]args){
String s="10Bangalore";
int i=Integer.parseInt(s);
System.out.println(i);
} Compilati Runtime
} 10Bangalore 10 on error Exception

Carefully read the question and answer accordingly.


What will be the output for following code?
public class While {
public static void main(String[]args){
int a='A';
int i=a+32;
while(a<='Z'){
a++;
}
System.out.println(i);
System.out.println(a);
}
} A,Z a,z 91,97 97,91
Carefully read the question and answer accordingly.
What will be the output for following code?
public class WrapperClass1 {
public static void main(String[]args){
Integer i=new Integer(10);
Integer j=new Integer(10);
System.out.println(i==j); None of
} compilatio the listed
} True False n error options

Carefully read the question and answer accordingly.


What will be the output for following code?
public class Wrapper2 {
public static void main(String[]args){
Byte b=1;
Byte a=2;
System.out.println(a+b); compiles
} compiles and compilatio Runtime and prints
} print 3 n error Error 12

Carefully read the question and answer accordingly.


What will be the output for following code?
public class Wrapper11
{
public static void main(String[]args)
{
Long l=100; code will
System.out.println(l); execute
} Compilati with out runtime
} 100 on error printing Exception

Carefully read the question and answer accordingly.


What will be the output of below code?
public class Test {
public static void main(String[] args) {
int i = 1;
Integer I = new Integer(i);
method(i);
method(I);
}
static void method(Integer I) {
System.out.print(" Wrapper");
}
static void method(int i) {
System.out.print(" Primitive");
} Primitive Wrapper
} Wrapper Wrapper Primitive Primitive
Carefully read the question and answer accordingly.
What is the value of variable "I" after execution of following
code?
public class Evaluate
{
public static void main(String[]args)
{
int i=10;
if(((i++)>12)&&(++i<15))
System.out.println(i);
else
System.out.println(i); None of
} the listed
} 10 11 12 options
Carefully read the question and answer accordingly.
Each case in switch statement should end with ________
statement default break continue new
Carefully read the question and answer accordingly.
Type 1 & Type 3 driver types are not vendor specific
implementation of Java driver. State True or False TRUE FALSE
Carefully read the question and answer accordingly.
The JDBC-ODBC Bridge driver translates the JDBC API to the ODBC Both A None of
ODBC API and used with which of the following: JDBC drivers drivers and B the above
ODBC ODBC ODBC
Carefully read the question and answer accordingly. written in written in written in
A Java program cannot directly communicate with an ODBC ODBC written Java C++ Basic
driver because of which of the following: in C language language language language

Carefully read the question and answer accordingly.


Which statements about JDBC are true?
1.JDBC has 5 types of Drivers
2.JDBC stands for Java DataBase Connectivity
3.JDBC is an API to access relational databases,
spreadsheets and flat files
4.JDBC is an API to bridge the object-relational mismatch
between OO programs and relational databases 1&2 3&4 2&3 1&4

Carefully read the question and answer accordingly.


Which type of driver converts JDBC calls into the network Type 2 Type 3 Type 4
protocol used by the database management system directly? Type 1 driver driver driver driver

All kinds
of
Statement
s (i.e.
which
implemen
Paramete t a sub
rizedState interface
Paramete ment and of
Carefully read the question and answer accordingly. PreparedStat rizedState CallableSt Statement
Which type of Statement can execute parameterized queries? ement ment atement )
Carefully read the question and answer accordingly.
Connection object can be initialized using which method of the putConnectio setConne Connectio getConne
Driver Manager class? n() ction() n() tion()
Carefully read the question and answer accordingly.
Which of the following is true with respect to code given below?
import java.sql.*;
public class OracleDemo
{
public static void main(String [] args) throws
SQLException,ClassNotFoundException
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection "SELECT
con=DriverManager.getConnection("jdbc:oracle:thin:@PC1886 * FROM
81:1521:training","scott","tiger"); Person"
Statement stmt=con.createStatement(); Class.for query
ResultSet rs=stmt.executeQuery("SELECT * FROM Person"); The code Name must be
while(rs.next()) will must be passed as
{ The code will display all mentione parameter
System.out.println(rs.getString("column1")); not compile values in d after to
} as no try column Connectio con.creat
} catch block named n eStateme
} specified column1 statement nt()
Carefully read the question and answer accordingly.
If your JDBC Connection is in auto-commit mode, which it is by
default, then every SQL statement is committed to the
database upon its completion. State True or False. TRUE FALSE

Call Call
method method Call
Call method executePr execute() method
execute() on ocedure() on a run() on a
a on a StoredPro Procedur
Carefully read the question and answer accordingly. CallableState Statement cedure eComma
How can you execute a stored procedure in the database? ment object object object nd object

Carefully read the question and answer accordingly.


Consider the following statements:
Statement A: The PreparedStatement object enables you to Statement
execute parameterized queries. Both A is True Statement
Statement B: The SQL query can use the placeholders which Statement A and A is False Both
are replaced by the INPUT parameters at runtime. and Statement and Statement
Which of the following option is True with respect to the above Statement B B is Statement s A and B
statements? are True. False. B is True. are False.

Connectio
n Connectio Connectio
cn=Driver n n
Manager. cn=Driver cn=Driver
getConne Manager. Manager.
ction("jdb getConne getConne
c:odbc:My ction("jdb ction("jdb
Connection dsn", c:odbc c:odbc:ds
Carefully read the question and answer accordingly. cn=DriverMan "usernam ","userna n" ,"usern
You are using JDBC-ODBC bridge driver to establish a ager.getConn e", me", ame",
connection with a database. You have created a DSN Mydsn. ection("jdbc:o "passwor "passwor "passwor
Which statement will you use to connect to the database? dbc"); d"); d"); d");
Carefully read the question and answer accordingly.
Which of the following listed option gives the valid type of java.sql.D java.sql.Ti java.sql.Ti
object to store a date and time combination using JDBC API? java.util.Date ate me mestamp
Carefully read the question and answer accordingly.
Which method executes an SQL statement that may return executeUpdat executeQ noexecut
multiple results? e() uery() execute() e()
Carefully read the question and answer accordingly.
Which package contains classes that help in connecting to a
database, sending SQL statements to the database, and connection.sq
processing the query results l db.sql pkg.sql java.sql
Carefully read the question and answer accordingly.
Which method sets the query parameters of the insertStrin setString( setToStrin
PreparedStatement Object? putString() g() ) g()

DDL DDL
statements statement
are treated as s cannot
normal SQL be
statements, executed
and are To by making
executed by execute use of
calling the DDL JDBC, Support
execute() statement you for DDL
method on a s, you should statement
Statement (or have to use the s will be a
a sub install native feature of
interface additional database a future
Carefully read the question and answer accordingly. thereof) support tools for release of
What is correct about DDL statements? object files this. JDBC

Carefully read the question and answer accordingly.


What is the state of the parameters of the PreparedStatement
object when the user clicks on the Query button? initialized started paused stopped
Carefully read the question and answer accordingly.
executeUpdate() & execute() are valid methods that can be
used for executing DDL statements. State True or False TRUE FALSE
Carefully read the question and answer accordingly.
Which object provides you with methods to access data from Parametri TableStat
the table? ResultSet zed ement Condition
Carefully read the question and answer accordingly.
The method Class.forName() is a part of JDBC API. State True
or False. TRUE FALSE

Carefully read the question and answer accordingly. Parametri Prepared


Which object allows you to execute parametrized queries? ResultSet zed Statement Condition
Carefully read the question and answer accordingly.
Which method executes a simple query and returns a single executeUpdat executeQ noexecut
Result Set object? e() uery() execute() e()
java.jdbc
and java.sql java.rdb
Carefully read the question and answer accordingly. java.jdbc and java.jdbc. and and
Which packages contain the JDBC classes? javax.jdbc sql javax.sql javax.rdb

select select select


ename ename ename
,sal ,sal ,sal
,deptno ,deptno ,deptno
from emp from emp from emp
select a where a where a where
ename ,sal a.sal > a.sal <= a.sal in
,deptno from (select (select (select
emp a where avg(sal) avg(sal) avg(sal)
a.sal < (select from emp from emp from emp
avg(sal) from b where b where b where
Carefully read the question and answer accordingly. emp b where a.deptno a.deptno a.deptno
You are writing a query to select all employees whose salary a.deptno = = = =
is less than the average of all the employees' salaries in the b.deptno) b.deptno) b.deptno) b.deptno)
same department. order by order by order by order by
Which query will help you to achieve your goal? deptno; deptno; deptno; deptno;

Carefully read the question and answer accordingly.


With SQL, how can you find the range for the price between
2000 and 8000 in item table?
1.Select * from item where price between 2000 and 8000.
2.Select * from item where price >=2000 and price <=8000.
3.Select * from item where price <>2000 and price !=8000.
4.Select * from item where price >2000 and price <8000. 1&2 3&4 2&3 1&4

Carefully read the question and answer accordingly.


Examine the table structure of Employee
Ename Ecode Dept
John 1 Sal
Smith 3 Mar
Max 2 Sal
Joe 4 Mar Sales Departme
Laura 5 Dep Marketing nt Cannot
What will be the output of below query ? Sales Marketing predict
select Marketing Marketing the output
decode(Ecode,5,'Department',4,'Marketing',3,’Marketing’,’Sales Query Departme Sales of the
’) as result from Employee; contains error nt Sales query
Carefully read the question and answer accordingly.
What will be the output of the query? Query
Select trim(0 from '00003443500') from dual? contains error 34435 3443500 3443500

adds 10 adds 10
minutes days to
adds 10 to the the
Carefully read the question and answer accordingly. seconds to current current query
What will be the output of the below query? the current Timestam Timestam contains
select to_CHAR(sysdate+(10/1400),'HH:MI:SS') from dual; Timestamp p p error
Carefully read the question and answer accordingly.
Which of the following integrity rules of SQL states that if a
relational table has a foreign key, then every value of the
foreign key must either be null or match the values in the Referential Domain Entity Table
relational table in which that foreign key is a primary key? Integrity Integrity Integrity Integrity
The
above
Carefully read the question and answer accordingly. query
What will be the result of the following code? contains
SELECT (2+3*4/2–5) FROM dual; 3 2 an error 5
Carefully read the question and answer accordingly.
What will be the output of the below query? Query
select instr('My SQL World','a') from dual; contains error Prints 0 Prints -1 Prints 6

All All
supplier supplier
record record
All whose whose
Carefully read the question and answer accordingly. supplier name name
What will be the output of the below query? Query will record will starts with starts with
SELECT * FROM suppliers generate an be % will be ! will be
WHERE supplier_name LIKE '!%' escape '!'; error displayed displayed displayed

Carefully read the question and answer accordingly.


Statement A:Listener process scans for connection requests to Statement Statement
an Oracle Instance Both A is true A is false Both
Statement B:Listener process links up a dispatcher process to Statements A and and Statement
user process. and B are Statement Statement s A and B
which of the following is true? true B is false B is true are false

Carefully read the question and answer accordingly. Top 2


What will be the output of the below query? student
select Stud_name from ( record If LINE 1
select rank() over(order by Marks desc) as rank ,Stud_name Top 2 student with is
from StudentDetails record with lowest removed
order by Stud_name --LINE 1 highest marks marks will Query will than the
) will be be generate query will
where rank > 3 displayed displayed an error execute

Flashback
Query
Flashback does not
Query apply to
For using needs to code
flashback be objects
query, the enabled like
server need and Packages
not be disabled ,
configured to using the Procedur
use DBMS_F es,
Carefully read the question and answer accordingly. Automatic LASHBA Function None of
Which of the following statement is True with respect to Query Undo CK or the listed
Flash Back? Management. package. Triggers options
Create Create Create
Create sequence sequence sequence
sequence MySeq MySeq MySeq
MySeq Start ( Start ( Start Start with
Carefully read the question and answer accordingly. with 2 with 2 with 2 2
Identify the correct syntax to create a sequence which Increment by Increment Increment Increment
generates values as 2,4,6,8,10? 1 by 1 ) by 2 ) by 2
Carefully read the question and answer accordingly.
A dropped table can be restored by issuing this command.
FLASHBACK TABLE Supplier TO BEFORE DROP;
State True or False. TRUE FALSE

It would
be
created
and
remains
It would It would in a
be be disabled
Carefully read the question and answer accordingly. created created state
Evaluate the CREATE TABLE statement: and would and would because
CREATE TABLE products It would be use an use an no index
(product_id NUMBER(6) CONSTRAINT prod_id_pk PRIMARY created only if automatic automatic is
KEY, a unique ally ally specified
product_name VARCHAR2(15)); index is created created in the
Which statement is true regarding the PROD_ID_PK manually unique nonuniqu command
constraint? created first. index. e index. .

Carefully read the question and answer accordingly. It would


Evaluate the following SQL statements that are issued in the remain
given order: disabled
CREATE TABLE emp It would and can
(emp_no NUMBER(2) CONSTRAINT emp_emp_no_pk remain be
PRIMARY KEY, disabled enabled
enameVARCHAR2(15), and has only by
salary NUMBER(8,2), It would to be dropping
mgr_no NUMBER(2) CONSTRAINT emp_mgr_fk be enabled the
REFERENCES emp); automatic manually foreign
ALTER TABLE emp ally using the key
DISABLE CONSTRAINT emp_emp_no_pk CASCADE; It would be enabled ALTER constraint
ALTER TABLE emp automatically and TABLE and re-
ENABLE CONSTRAINT emp_emp_no_pk; enabled and immediat command creating
What would be the status of the foreign key EMP_MGR_FK? deferred. e. . it.
Carefully read the question and answer accordingly.
Program Global Area (PGA) contain Data and control
information for a Server process? State True or False. TRUE FALSE

Start an Mount the Start an Start the


instance, database, instance, database,
Open the Start the Mount the Start the
Carefully read the question and answer accordingly. Database, instance, database, instance,
Which of the following gives the order of Database Mount the Open the Open the Mount the
administrative steps needed to open an Oracle Database? database database database Database
Carefully read the question and answer accordingly.
When Oracle starts an instance, it reads the server parameter SYSOPER SYSDBA
file called _______________. FILE SPFILE FILE PFile

Separate
GRANT
statement
WITH s are
GRANT required
Carefully read the question and answer accordingly. ALL OPTION for
The user SCOTT who is the owner of ORDERS and PUBLIC should be should be ORDERS
SUPPLIERS tables issues the following GRANT command: should be replaced added to and
GRANT ALL replaced with with a list the SUPPLIE
ON orders, Suppliers TO PUBLIC; specific of specific statement RS
What correction needs to be done to the above statement? usernames. privileges. . tables.
Carefully read the question and answer accordingly.
Which of the following is used to store the most recently Data
executed SQL statements and the most recently used data Dictionary Shared Library
definitions? Data Pool Cache Pool Cache

One or
more The table
columns is large
are and most
frequently queries
used are
A column together expected
contains in a to retrieve
A column large where less than
contains a number of clause or 2 to 4 %
Carefully read the question and answer accordingly. wide range of null a join of the
Identify the circumstance under which you will create an Index? values. values. condition. rows.

A
synonym A A
with the synonym synonym
name with the with the
A synonym UserDetai name name
Carefully read the question and answer accordingly. with the name ls is User is User is
You are using the system account to create a synonym as UserDetails is created created created
follows: created and and any and only and any
Create synonym User for UserDetails only system user can system user can
Which statements are true with respect to the above synonym? can access it access it can use it access it
Carefully read the question and answer accordingly.
Oracle instance comprises of background processes and
memory structure. State True or False. TRUE FALSE
Carefully read the question and answer accordingly.
In Oracle10g database, control files contain information that
describes the names, locations, and sizes of the database
files. State true or False. TRUE FALSE

DROP DROP
PURGE PURGE ALL_TAB DBA_RE
Carefully read the question and answer accordingly. DBA_RECYC RECYCL LE_RECY CYCLEBI
How to drop all tables from recycle bin? LEBIN EBIN CLEBIN N
Carefully read the question and answer accordingly.
Which of the following parameter in Query Flashback clearly UNDO_T UNDO_R DBA_UN
defines the maximum time period that the database can be UNDO_MAN ABLESPA ETENTIO DO_EXT
flashbacked? AGEMENT CE N ENTS
Carefully read the question and answer accordingly.
When a database is created the users SYS and SYSTEM are
created automatically and granted the DBA role. State True or
False. TRUE FALSE

Carefully read the question and answer accordingly.


Identify the below statement:

STATEMENT A : In Oracle 10g the default action of a DROP


TABLE command is to move the table to the recycle bin (or Both Statement Statement Both
rename it), rather than actually dropping it. statement A A is true B is true statement
STATEMENT B: PURGE option can be used to permanently and B are and B is and A is s A and B
drop a table. True. False. False. are False.

Carefully read the question and answer accordingly.


SELECT
e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID,
d.DEPARTMENT_NAME
FROM EMP e, DEPARTMENT d
WHER e.DEPARTMENT_ID = d.DEPARTMENT_ID; Intersecti
Selection, Difference Selection, on,
In the statement, which capabilities of a SELECT statement Projection, ,Projectio Intersecti Projection
are performed? Join n, Join on, Join , Join

To join
two tables
through
You an
specify an equijoin,
equijoin the
condition columns
You can in the in the join
join a SELECT condition
maximum or FROM must be
You can join of two clauses of primary
a maximum of columns a key an
two tables through SELECT foreign
Carefully read the question and answer accordingly. through an an statement key
What is true about joining tables through an equijoin? equijoin. equijoin. . columns.

Select
Select Select count(*)
count(*) count(*) from emp
Select from emp from emp where sal
count(*) from where sal where sal exist
Carefully read the question and answer accordingly. emp where > (select > (select (select
John wants to see how many employees are there whose sal > (select Avg(sal) Average(s avg(sal)
salary is above average. max(sal) from from al) from from
Which of the following query will help john to achieve this task? emp); emp); emp); emp);
select select
empNam select empNam
e, empNam e ,
select empNo e, empNo
empName , from emp empNo from emp
empNo from where from emp where
emp where empno where empno
Carefully read the question and answer accordingly. empno = exists empno in has Any
John wants to retrieve all the employee details whose ( select ( select ( select ( select
Employee Number matches to any of the Department Number. deptNo from deptNo deptNo deptNo
Help john to achieve his task dept) from dept) from dept) from dept)
Carefully read the question and answer accordingly.
An outer join returns all rows that satisfy the join condition and
those rows from one table for which no rows from the other
satisfy the join condition.
State True or False. TRUE FALSE
Carefully read the question and answer accordingly.
Which of the Following Statements are true? Statement Both Both
Statement A : Join permanently joins two tables having 1 or Statement A A is false statement statement
more common attributes is true and B and B is s A and B s A and B
Statement B: Inner Joins are also called as EQUI Joins is false. true. are true. are false.

You want You want You want


all all all
unmatche matched unmatche
Both tables d data data from d data
Carefully read the question and answer accordingly. have NULL from one both from both
In which case should you use a FULL OUTER JOIN? values. table. tables. tables.
Carefully read the question and answer accordingly.
Identify the type of join used in the below query
SELECT empName,DeptNo,DeptName Invalid
FROM Emp, Dept Natural Non Equi Syntax for
WHERE Emp.DeptId >Dept.DeptId Equi Join Join Join Join

Carefully read the question and answer accordingly.


Which of the following statements are true ?
Statement A: The ANY operator compares the main query with Statement Both Both
any of the values returned by the inner query. Statement A A is false statement statement
Statement B: The ALL operator compares a value to every is true and B and B is s A and B s A and B
value return by the sub query. is false. true. are true. are false.
Carefully read the question and answer accordingly.
Which of the following is the correct syntax for left outer join ?
1.select Stud_Name , clg_Name
from student s left outer join college c
on s.clg_code = c.clg_code
2.select Stud_name , clg_Name
from studentDemo s ,collegeDemo c
where s.clg_code = c.clg_code(+)
3.select Stud_name , clg_Name
from studentDemo s ,collegeDemo c
where s.clg_code(+) = c.clg_code
4.select Stud_Name , clg_Name
from student s outer join left college c
on s.clg_code = c.clg_code
5.select Stud_Name , clg_Name
from student s left outer join college c
where s.clg_code = c.clg_code 1&2 1&5 2&3 1&4

Carefully read the question and answer accordingly.


Which two statements are true regarding the USING clause in
table joins?
1. It can be used to join a maximum of three tables.
2. It can be used to restrict the number of columns used in a
NATURAL join.
3. It can be used to access data from tables through equijoins
as well as nonequijoins.
4. It can be used to join tables that have columns with the
same name and compatible data types. 1&2 3&4 2&3 1&4
Carefully read the question and answer accordingly. None of
What's the result of the following concatenation applesauc the listed
'apple' || NULL || NULL || 'sauce' apple sauce NULL e option

The IN
IN parameter
Paramete is a
r value variable
should be whose
passed to The same value will
the parameter change in
procedure will serve the
IN Parameter for as input invoked
Carefully read the question and answer accordingly. is the default processin and procedure
Which statements are true about IN parameter? parameter. g. output. .
When the
EXIT
statement
is
encounter
ed, the
condition
in the
WHEN
clause is
evaluated
. If the
condition
is true,
the loop
completes The EXIT-
The EXIT- and WHEN
WHEN control statement
statement lets passes to replaces
a loop the next a simple
complete statement IF
Carefully read the question and answer accordingly. unconditionall after the statement None of
What is an EXIT - WHEN statement? y. loop . the above

Carefully read the question and answer accordingly.


Which of the values can be assigned to a Boolean variable ? TRUE FALSE NULL

Column Column
constraint constraint
s, such as s, such as
the NOT the NOT
NULL and NULL and
We can use check check
the %TYPE constraint constraint
attribute as a , or , or %TYPE is
datatype default default used
specifier values values when
when are not are declaring
declaring inherited inherited variables
constants, by items by items to hold
variables, declared declared database
Carefully read the question and answer accordingly. fields, and using using table
What is meant by %Type? parameters. %TYPE. %TYPE. values

Carefully read the question and answer accordingly.


You must declare each variable of same data type separately TRUE FALSE
if you
change
the
database
definition
of
last_nam
e,
perhaps
to make it
a longer
character
string, the
datatype
of
v_last_na
you need not me
Carefully read the question and answer accordingly. know the changes
Pick the advantage of declaring a variable using %TYPE exact memory accordingl faster
attribute. For example: datatype of consumpti y at run processin
v_last_name employees.last_name%TYPE. last_name on is less time. g
Carefully read the question and answer accordingly.
Fields in a %ROWTYPE record inherit constraints TRUE FALSE

Carefully read the question and answer accordingly. Employee


Identify the code snippet name
declare EmpNAME; whose
begin employee
SELECT ENAME INTO EmpNAME FROM Emp WHERE Employee All no is
EmpNo=101172; name whose employee 101172 is The code
dbms_output.put_line(EmpName); employee no names printed if does not
end; is 101172 is will be serverout compile at
what will be the output of the above code printed printed put is on all

Carefully read the question and answer accordingly.


Predict the value of variable named "B" ?
DECLARE
A BOOLEAN := NULL;
B BOOLEAN;
BEGIN
B := A IS NULL;
IF B IS NULL THEN
DBMS_OUTPUT.PUT_LINE('HI');
END IF; BLANK
END; TRUE FALSE NULL SPACE
Carefully read the question and answer accordingly.
State True or False,
What are the two types of conversion between datatypes?
1)Explicit datatype conversion
2)Implicit datatype conversion TRUE FALSE
Carefully read the question and answer accordingly.
PL/SQL treats any zero-length string as _______ blank space NULL string character
Carefully read the question and answer accordingly.
In conditional control statements, if the condition yields NULL,
its associated sequence of statements is not executed TRUE FALSE

Carefully read the question and answer accordingly.


Which of the following statements are true?
1.A PL/SQL block has three parts, declarative part, an
executable part and an exception handling part.
2.Declarative and Executable block are Mandatory
3. A PL/SQL Block can be anonymous or named
4. Identifiers in PL/SQL can contain max 35 character
5. Blocks of PL/SQL statements are translated by the PL/SQL
engine that can reside either in the client or at the server side. 1&2 1&2&3 1&3&4 1&2&4

Carefully read the question and answer accordingly.


DECLARE
v_boolean BOOLEAN;
BEGIN
v_boolean := 'TRUE';
DBMS_OUPUT.PUT_LINE(v_boolean); Leads to
END; compilatio Displays Leads to
Predict the output of the program ? TRUE n error nothing Exception

DBMS_O
UTPUT.P
UT_LINE(
' The
DBMS_OUTP DBMS_O DBMSOU employee
Carefully read the question and answer accordingly. UT.PUT_LIN UTPUT.P TPUT.PU name is :
How to display output from PLSQL? E UTLINE T_LINE X')

%TYPE
variables %TYPE
%TYPE do not variables %TYPE
variables do inherit do not variables
Carefully read the question and answer accordingly. not inherit check inherit inherit
Pick the CORRECT statement about %TYPE variables NOT NULL constraint default default
such as the NOT NULL or or default values constraints , values values
Carefully read the question and answer accordingly.
Identify the code snippet
DECLARE
var_num1 number:=50;
var_num2 number;
BEGIN
var_num2 := 200;
DECLARE
var_mult number;
var_num1 number:= 100; -- LINE 1
BEGIN
var_mult := var_num1 * var_num2;
END;
dbms_output.put_line( var_num1);
END; Compiles Compiles
/ , executes , executes
what will be the output of the above code assume serveroutput Runs without Compilati and Prints and Prints
is on any output on fails 100 50

Carefully read the question and answer accordingly.


In Oracle PL/SQL by default, variables are initialized to NULL. TRUE FALSE
Carefully read the question and answer accordingly.
The %ROWTYPE attribute provides a record type that nested
represents a row in view index table table

Returns Return
NULL if the FALSE if
cursor is Return a Return
open but FALSE if successfu the
fetch has not no rows l fetch has number of
Carefully read the question and answer accordingly. been was been rows
What are the true aspects about the %NOTFOUND attribute? executed. returned executed. fetched

In a table,
if no
single
column
can be
assigned
Primary uniquely
Key as
constraint A primary primary
has to be key can key, then
explicitly be a
A Default dropped reference combinati
index is before d in on of two
created in the completel another columns
Carefully read the question and answer accordingly. column which y table as a can act as
In SQL, which of the following is NOT true with respect to acts as a removing Foreign a Primary
Primary Key? Primary key. the table. Key. Key.
Invalid
Carefully read the question and answer accordingly. Variable
Identify the type of variable declared Host declaratio Global
VARIABLE City Varchar2(20). Bind Variable Variable n Variable
None of
Carefully read the question and answer accordingly. Associativ the listed
Which is called as index-by tables ? Nested tables e arrays Varrays option
Carefully read the question and answer accordingly. Error ,
If the declaration is Number (4,5) and the assigned value is exceeds 12345.56 1234.556 1.234556
123.4567 , what is the stored value? precision 7 7 7

Carefully read the question and answer accordingly.


Consider the following statements that describes a PL/SQL Statement
Block Structure: Statement1 1 and
Statement1: Declare and Exception Sections are mandatory. and Only Only Statement
Statement2: Begin and End Sections are optional. Statement2 Statement Statement 2 are
Which of the following is applicable for above? are true. 1 is True. 2 is False. False.

Carefully read the question and answer accordingly.


Examine the code snippet
DECLARE Num Number;
BEGIN
Num:=10;
DECLARE
Num Number; --LINE 1
BEGIN
Num:=12;
while(Num<13)
loop
dbms_output.put_line(Num);
Num:=Num+1;
END loop;
END;
if Num < 12 --LINE 2
then
dbms_output.put_line('Less'); Compilati
end if; on fails Compiles Compiles
END; Compilation due to executes executes
/ fails due to error on and prints and prints
What will be the result of the above code? error on line 1 line 2 12 Less 12 More
The
selector is
followed
by one or
more
WHEN
clauses,
which are
checked
The CASE sequential
statement ly. The
selects one value of
sequence of the
statements to selector
execute. To determine
select the s which
sequence, clause is
the CASE executed.
statement If the
uses a value of
selector the
rather than selector
multiple equals The ELSE
Boolean the value clause
expressions. of a does not
A selector is WHEN- works
an expression clause similarly
whose value expressio to the
is used to n, that ELSE CASE
select one of WHEN clause in statement
Carefully read the question and answer accordingly. several clause is an IF s can be
What is meant by case statements in PLSQL? alternatives executed statement labeled
Carefully read the question and answer accordingly.
The patterns matched by LIKE can include two special- .- %(percent *
purpose characters called wildcards. _(underscore) ( hyphen) sign) (asterisk)
Carefully read the question and answer accordingly.
Comparisons involving nulls always yield NULL TRUE FALSE

The
Subprogr
ams that
are
present
A inside a
package package
body cannot
A package appears A exists
specification without package separatel
can exists package can be y as
Carefully read the question and answer accordingly. without a specificati invoked database
What are the true aspects of PLSQL? package body on by itself. objects.
max_days CONSTA
_in_year NT
max_days_in CONSTA max_days
_year NT _in_year None of
Carefully read the question and answer accordingly. CONSTANT INTEGER INTEGER the listed
Pick the valid constant declaration in PL/SQL INTEGER; := 366; := 366; option

Value
before
change
(:OLD) : Value
Value before
before change
Value before delete (:OLD) :
change Value Null Value
(:OLD) : Null After After
Carefully read the question and answer accordingly. Value After change change
What will be the old and new value of a database column change (:NEW) : (:NEW) : None of
before AFTER and DELETE operation? (:NEW) : Null Null Not Null the above

A GOTO
statement
can
transfer
control
A GOTO from one
statement IF
cannot statement
transfer clause to
control into another, A GOTO A GOTO
an IF or from statement statement
statement, one can cannot
CASE CASE transfer transfer
statement, statement control control
LOOP WHEN into an out of a
Carefully read the question and answer accordingly. statement, or clause to exception subprogra
What are the restrictions of GO TO statements? sub-block. another. handler. m.

When an
EXIT
When an statement
When an EXIT is
EXIT statement encounter
statement is ed, the
is encounter loop does
encounter ed, the not gets
ed, the loop complete
loop completes d
completes immediat immediat
The EXIT immediat ely and ely and
statement ely and control control
forces a loop control passes to passes to
to complete passes to the end of the end of
Carefully read the question and answer accordingly. unconditionall the next the the
What does an EXIT statement do in PLSQL? y statement program program
Carefully read the question and answer accordingly. PROGRA
You cannot assign nulls to a variable defined as NOT NULL. If STORAGE_E VALUE_E SELF_IS_ M_ERRO
you try, PL/SQL raises the predefined exception _________ RROR RROR NULL R
Carefully read the question and answer accordingly.
Which of the following statement is TRUE None of
(i) Strong REF CURSOR types are less error prone the listed
(ii) Weak REF CURSOR types are not flexible (i) (ii) (i) & (ii) option
Carefully read the question and answer accordingly.
Which of the following logically related components can be exception procedure
grouped in a PL/SQL package ? PL/SQL types s s functions
Carefully read the question and answer accordingly.
A PL/SQL function can return more than one value from a
function using PL/SQL record or PL/SQL table TRUE FALSE

Condition
al
expressio The
ns of the VALUES The SET
WHERE clause of clause of
The SELECT and the the
Carefully read the question and answer accordingly. list or clause HAVING INSERT UPDATE
User-defined PL/SQL functions can be used in of a query clauses statement statement
Carefully read the question and answer accordingly.
which parameter passing mode passes a value from the
calling environment to the procedure and a possibly different None of
value from the procedure back to the calling environment using the listed
the same parameter ? IN OUT IN OUT option
Carefully read the question and answer accordingly.
Which of the following sections can be present in an Executabl All Listed
anonymous PL/SQL block? Declaration e Exception options
CREATE
OR
REPLAC
E CREATE CREATE
TRIGGER OR OR
check_sal REPLAC REPLAC
BEFORE E E
UPDATE TRIGGER TRIGGER
OF sal check_sal check_sal
ON emp BEFORE AFTER
FOR UPDATE UPDATE
EACH OF sal OR sal
ROW ON emp ON emp
WHEN WHEN WHEN
(new.sal < (new.sal < (new.sal <
old.sal old.sal old.sal
OR OR OR
new.sal > new.sal > -new.sal >
old.sal * old.sal * old.sal *
1.1) 1.1) 1.1)
BEGIN BEGIN BEGIN
RAISE_A RAISE_A RAISE_A
PPLICATI PPLICATI PPLICATI
ON_ERR ON_ERR ON_ERR
OR ( - OR ( - OR ( -
ALTER 20508, 20508, 20508,
TABLE emp ‘Do not ‘Do not ‘Do not
ADD decrease decrease decrease
CONSTRAIN salary not salary not salary not
T ck_sal increase increase increase
Carefully read the question and answer accordingly. CHECK (sal by more by more by more
Which code can you use to ensure that the salary is not BETWEEN than than than
increased by more than 10% at a time nor is it ever sal AND 10%’); 10%’); 10%’);
decreased? sal*1.1); END; END; END;
Carefully read the question and answer accordingly. None of
what is the result when we attempt to change the value of an run time compile- the listed
IN parameter ? exception time error no error option

Carefully read the question and answer accordingly.


CREATE OR REPLACE FUNCTION dml_call_sql(sal
NUMBER)
RETURN NUMBER IS
BEGIN
INSERT INTO employees(employee_id, last_name,
email, hire_date, job_id, salary)
VALUES(1, 'Frost', '[email protected]',
SYSDATE, 'SA_MAN', sal);
RETURN (sal + 100);
END;
The above user defined PL/SQL function is called from the
below UPDATE query. What is your prediction about the
OUTPUT ?
UPDATE employees throws result in None of
SET salary = dml_call_sql(2000) UPDATE will EXCEPTI mutating the listed
WHERE employee_id = 170; happen ON table error option
Carefully read the question and answer accordingly.
A package specification can exist without a package body; that
is, when the package specification does not declare
subprograms a body is not required TRUE FALSE
Carefully read the question and answer accordingly.
There exists a procedure called add_dept with two parameters. combined
The procedure is called as shown below (positional None of
EXECUTE add_dept ('ADVERTISING', loc => 1200) and the listed
What type of parameter-passing is this ? positional named named) option
Carefully read the question and answer accordingly.
All the named parameters should precede the positional
parameters in a subprogram call. TRUE FALSE

FOR
EACH Statement
ROW -level
Carefully read the question and answer accordingly. Statement trigger on trigger on
You need to create a trigger on the EMP table that monitors FOR EACH -level the the
every row that is changed and places this information into the ROW trigger trigger on AUDIT_T AUDIT_T
AUDIT_TABLE. on the EMP the EMP ABLE ABLE
What type of trigger do you create? table. table. table. table.

Carefully read the question and answer accordingly.


Which two statements about packages are true?
1.Packages can be nested.
2.You can pass parameters to packages.
3.A package is loaded into memory each time it is invoked.
4.The contents of packages can be shared by many
applications.
5. You can achieve information hiding by making package
constructs private. 1&2 1&5 2&3 1&4

Carefully read the question and answer accordingly.


Under which two circumstances do you design database
triggers?
1.To duplicate the functionality of other triggers.
2. To replicate built-in constraints in the Oracle server such as
primary key and foreign key.
3.To guarantee that when a specific operation is performed,
related actions are performed
4.For centralized, global operations that should be fired for the
triggering statement, regardless of which user or application
issues the statement. 1&2 1&4 2&3 3&4
Carefully read the question and answer accordingly.
The functions used in SQL statements should not
use OUT or IN OUT mode parameters TRUE FALSE
Carefully read the question and answer accordingly.
Consider the following code segment :
DECLARE
TYPE first_rectype IS RECORD (
var1 VARCHAR2(100) := 'Hello World');
first_rec first_rectype;
TYPE second_rectype IS RECORD
(nested_rec first_rectype := first_rec); dbms_out dbms_out
second_rec second_rectype; dbms_out put.put_li put.put_li
Begin put.put_li ne(secon ne(secon
// ----line1 dbms_output. ne(secon d_rec.first d_rec.nes
End put_line(seco d_rec.var _rec.var1) ted_rec.v
Which of the following statement can be fitted at ----line1? nd_rec); 1); ; ar1);
Carefully read the question and answer accordingly.
What part of a database trigger determines the number of Trigger Trigger Trigger
times the trigger body executes? Trigger type body event timing

optional
Carefully read the question and answer accordingly. precision datatype value for
For the parameters of the PL/SQL procedures, which cannot length of the of the of the the
be specified ? parameter parameter parameter parameter

PL/SQL
PL/SQL procedure
PL/SQL procedure Can
procedure cannot contain a RETURN
Can contain a contain RETURN statement
RETURN RETURN statement Not
statement statement with a allowed in
Carefully read the question and answer accordingly. without a without a single PL/SQL
Pick the VALID statement about PL/SQL procedure ? value value value procedure

When a
PL/SQL- The
packaged package
construct specificati
is on may
reference also
d for the include PRAGMA
first time, PRAGMA s are not
the whole s, which allowed
package are as part of
Package is loaded directives package
Carefully read the question and answer accordingly. body is into to the specificati
Which are VALID statement about PL/SQL package ? optional memory compiler on
combined
Carefully read the question and answer accordingly. (positional None of
When calling a function in a SQL statement which parameter and the listed
notation must be used ? positional named named) option
None of
these
command
s; you
ALTER cannot
ALTER TABLE disable
employee employee multiple
ALTER s s triggers
TRIGGERS DISABLE DISABLE on a table
Carefully read the question and answer accordingly. ON TABLE ALL ALL in one
You need to disable all triggers on the EMPLOYEES table. employees TRIGGER TRIGGER command
Which command accomplishes this? DISABLE; S; S; .
Carefully read the question and answer accordingly. ALL_SOURC USER_S USER_O USER_S
what are the data dictionary views? E OURCE BJECTS OURCES

Carefully read the question and answer accordingly.


What is the sequence of output of the following code?
DECLARE
TYPE list_of_names_t IS TABLE OF emp.ename
%TYPE
INDEX BY BINARY_INTEGER;
family_mem list_of_names_t;
l_row BINARY_INTEGER;
BEGIN
family_mem (100) := 'Veena';
family_mem (-15) := 'Sheela';
family_mem (-30) := 'Syed';
family_mem (88) := 'Raji';
l_row := family_mem.FIRST;
WHILE (l_row IS NOT NULL)
LOOP
DBMS_OUTPUT.put_line ( family_mem(l_row)); Sheela, Raji,
l_row := family_mem.NEXT (l_row); Veena, Syed, Syed, Syed,
END LOOP; Syed,Sheela, Veena, Sheela,R Sheela,
END; Raji Raji aji, Veena Veena
Carefully read the question and answer accordingly.
A procedure containing a single OUT parameter would be
better rewritten as a function returning the value. TRUE FALSE

Functions Functions
called called
from: An from: An
UPDATE UPDATE
or Functions or
DELETE called DELETE
statement from: • A statement
Functions on a table SELECT on a table
called from: • T cannot statement T can
A SELECT query or can query or
statement contain contain contain
Carefully read the question and answer accordingly. cannot DML on DML DML on
Which are TRUE about calling a function from SQL contain DML the same statement the same
expressions ? statements table T s table T
Carefully read the question and answer accordingly.
The functions can return PL/SQL specific data types such as
BOOLEAN, RECORD, or TABLE TRUE FALSE

The
trigger
The fails
trigger because
fails you
The because cannot
trigger a use the
fails SELECT minimum
Carefully read the question and answer accordingly. because it statement and
You have a row level BEFORE UPDATE trigger on the EMP needs to on the maximum
table. This trigger contains a SELECT statement on the EMP be a row table functions
table to ensure that the new salary value falls within the level being in a
minimum and maximum salary for a given job title. What The trigger AFTER updated BEFORE
happens when you try to update a salary value in the EMP fires UPDATE is not UPDATE
table? successfully. trigger. allowed. trigger.
Carefully read the question and answer accordingly. None of
Which parameter mode can be used to assign a default value the listed
in the formal parameter declaration ? IN OUT OUT IN option
the
Using the parameter
Using the %ROWTY size
Carefully read the question and answer accordingly. an explicit %TYPE PE specificati
The parameters for procedures can be specified using ? data type definition definition on

Carefully read the question and answer accordingly.


What exception is raised when the user enters the ID as -6 in
the below code?
DECLARE
c_id customers.id%type := &cc_id;
c_name customers.name%type;
c_addr customers.address%type;
-- user defined exception
ex_invalid_id EXCEPTION;
BEGIN
IF c_id <= 0 THEN
RAISE ex_invalid_id;
ELSE
SELECT name, address INTO c_name, c_addr
FROM customers
WHERE id = c_id;
END IF;
EXCEPTION The TOO
WHEN ex_invalid_id THEN ex_invalid program MANY
dbms_output.put_line('ID must be greater than zero!'); NO DATA _id will be ROWS
WHEN no_data_found THEN FOUND exception terminate exception
dbms_output.put_line('No such customer!'); exception will will be d will be
END; / be raised raised abruptly. raised
Replacing
RAISE_A Replacing
PPLICATI RAISE_A
ON_ERR PPLICATI
OR(- ON_ERR
20000, OR(-
'no 20000,
negative 'no
age negative
allowed'); age
Carefully read the question and answer accordingly. to allowed');
You are developing a trigger which should ensure that no RAISE_A to
negative value is inserted in employee table’s Age column . PPLICATI RAISE_A
you have created a trigger as follows ONS_ER PPLICATI
create or replace trigger AgeVerify ROR(- ONS_ER
before insert 20000, ROR(-
on employee for each row 'no 20000,”no
when(new.EmpAge < 0) negative No negative
begin The order of age problem age
RAISE_APPLICATION_ERROR(-20000, 'no negative age Arguments allowed'); in the allowed”);
allowed'); passed to will give trigger. It will give
end; RAISE_APPL the gives the the
/ ICATION_ER desired desired desired
Identify error if any in the above trigger and give the solution. ROR is wrong output result output

Carefully read the question and answer accordingly.


What is the syntax of Function?
CREATE [OR REPLACE] FUNCTION function_name
[parameters]
IS
Declaration_section
RETURN return_datatype;
BEGIN
Execution_section
Return return_variable;
EXCEPTION
exception section
Return return_variable;
END; TRUE FALSE
Declare , Declare ,
Carefully read the question and answer accordingly. Open , Open , Open , Fetch ,
Consider you are creating a cursor,Choose the correct Declare , Fetch , Fetch , Open
sequence of steps to work with cursors? Fetch Close Close Close Fetch

Comparison
operators The value
cannot be of a
used to test cursor Two types
cursor variable of cursors Null
variables for can be are 1) cannot be
equality, stored in Strongly assigned
inequality, a typed and to a
Carefully read the question and answer accordingly. null, or not database 2) Weakly cursor
What are the restrictions of REF cursor in PLSQL? null. column Typed. variable
The
select
statement
provided
within the Open
cursor statement
statement retrieves The
gets the rows active set
Opening the executed from the pointer is
cursor when we cursor set to the
Carefully read the question and answer accordingly. allocates the open the and will second
What occurs when a cursor is opened? memory first. cursor. process it. row.

When we
issues a
SELECT..
FOR
UPDATE
clause the
RDBMS will The lock
automatically The will not be
place a locks records released
on the all the will be even if we
rows available issue
identified by for our ROLLBA
Carefully read the question and answer accordingly. the select changes CK or None of
What is FOR UPDATE clause in Cursors? statement. only. COMMIT . the above
declare
EnameUs
er
Emp.ena
me%type;
MrgUser
Emp.Mrg
%type;
Replace cursor c1
Replace the above is select
the above code as EnameUs
code as declare er,MrgUs
declare enameUs er from
enameUs er Emp;
er Emp.ena begin
varchar(2 me%type; open c1;
0); MrgUser loop fetch
MrgUser Emp.Mrg c1 into
varchar(2 %type; EnameUs
0); begin begin er,MrgUs
select select er; exit
ename,Mr ename,Mr when
Carefully read the question and answer accordingly. g into g into c1%NOT
The following Block of statement is written to check the enameUs enameUs FOUND;
manager for each employee er,MrgUs er,MrgUs dbms_out
declare er from er from put.put_li
cursor c1 is Emp; Emp; ne('
select ename , Mgr dbms_out dbms_out Employee
from Emp; put.put_li put.put_li '||
begin ne('Emplo ne('Emplo EnameUs
for rec in c1 LOOP yee '|| yee '|| er||'
dbms_output.put_line('Employee '||rec.ename||' Works for '|| enameUs enameUs Works for
rec.Mgr); The above er||' er||' '||
end loop; code has no Works for Works for MrgUser);
end; error and '|| '|| end loop;
Identify errors if any in the above code and provide suitable gives the MrgUser); MrgUser); close c1;
solution desired result end; / end; / end;
create or create or
create or replace replace
replace procedure procedure
procedure prcEmp_d prcEmp_d
prcEmp_d etails(Em etails(Em
etails(Em pName pName
pName varchar2 varchar2
create or varchar2) OUT) as OUT) as
replace as begin begin begin
procedure declare declare declare
prcEmp_detai cursor c1 cursor c1 cursor c1
ls(EmpName is select * is select * is select *
varchar2) as from Emp from Emp from Emp
begin declare where where where
cursor c1 is Ename=E Ename=E Ename=E
select * from mpName; mpName; mpName;
Emp where begin for begin for begin for
Ename=Emp rec in c1 rec in c1 rec in c1
Name; begin LOOP LOOP LOOP
for rec in c1 dbms_out dbms_out dbms_out
LOOP put.put_li put.put_li put.put_li
dbms_output. ne(c1.ena ne(rec.en ne(c1.ena
put_line(rec.e me||’ ’|| ame||’ ’|| me||’ ’||
Carefully read the question and answer accordingly. name||’ ’|| c1.empN rec.empN c1.empN
You are creating a procedure which accepts the employee rec.empNO||’ O||’ ’|| O||’ ’|| O||’ ’||
name and displays the employee details like Employee Name, ’||rec.Mrg); c1.Mrg); rec.Mrg); c1.Mrg);
Employee No, Manager end loop; end loop; end loop; end loop;
Identify the correct syntax to achieve the desired result. end; end; end; end; end; end; end; end;
CURSOR
DECLAR occupanc
E y_cur IS
CURSOR SELECT
DECLAR occupanc pet_id,
E y_cur IS room_nu
CURSOR SELECT mber
occupanc pet_id, FROM
DECLARE y_cur IS room_nu occupanc
CURSOR SELECT mber y WHERE
occupancy_c pet_id, FROM occupied_
ur IS room_nu occupanc dt =
SELECT mber y WHERE SYSDAT
pet_id, FROM occupied_ E; BEGIN
room_number occupanc dt = OPEN
FROM y WHERE SYSDAT occupanc
occupancy occupied_ E; BEGIN y_cur
WHERE dt = FOR FOR
occupied_dt = SYSDAT occupanc occupanc
Carefully read the question and answer accordingly. SYSDATE; E; BEGIN y_rec IN y_rec IN
How to convert the following code using the cursor FOR occupancy_re FOR occupanc occupanc
LOOP? c occupanc y_cur y_cur
DECLARE occupancy_c y_rec IN LOOP LOOP
CURSOR occupancy_cur IS ur occupanc update_bi update_bi
SELECT pet_id, room_number %ROWTYPE; y_cur ll ll
FROM occupancy WHERE occupied_dt = SYSDATE; BEGIN FOR LOOP (occupan (occupan
occupancy_rec occupancy_cur%ROWTYPE; occupancy_re update_bi cy_rec.pe cy_rec.pe
BEGIN c IN ll t_id, t_id,
OPEN occupancy_cur; occupancy_c (occupan occupanc occupanc
LOOP ur LOOP cy_rec.pe y_rec.roo y_rec.roo
FETCH occupancy_cur INTO occupancy_rec; update_bill t_id, m_numbe m_numbe
EXIT WHEN occupancy_cur%NOTFOUND; (occupancy_r occupanc r); END r); END
update_bill (occupancy_rec.pet_id, ec.pet_id, y_rec.roo LOOP; LOOP;
occupancy_rec.room_number); occupancy_re m_numbe CLOSE CLOSE
END LOOP; c.room_numb r); END occupanc occupanc
CLOSE occupancy_cur; er); END LOOP; y_cur; y_cur;
END; LOOP; END; END; END; END;
DECLAR
DECLAR E
E exception DECLAR
exception _name E
_name EXCEPTI exception
DECLARE EXCEPTI ON _name
exception_na ON PRAGMA EXCEPTI
me PRAGMA EXCEPTI ON
EXCEPTION EXCEPTI ON_INIT PRAGMA
EXCEPTION ON_INIT (exceptio EXCEPTI
_INIT (exceptio n_name , ON_INIT
PRAGMA n_name , err_code); (exceptio
(exception_n err_code); Begin n_name);
ame , Begin Execution Begin
err_code); Execution section Execution
Begin section Exception section
Execution Exception WHEN Exception
section WHEN PRAGMA WHEN
Exception exception exception exception
WHEN _name _init _name
exception_na THEN THEN THEN
me THEN Handle Handle Handle
Handle the the the the
Carefully read the question and answer accordingly. exception exception exception exception
What is the syntax of PRAGMA EXCEPTION_INIT? END; END; END; END;

Whenever
Implicit a DML
cursors are statement
automatically (INSERT,
created by UPDATE
oracle when a For and
select query INSERT DELETE)
in PLSQL is operation is issued,
executed. s, the an implicit
Explicit implicit cursor is The
cursors is cursor not implicit
explicitly holds the automatic cursor is
attached to a data that ally declared
select query need to associate in the
Carefully read the question and answer accordingly. by be d with this declaratio
What are the true aspects of implicit and explicit cursors? programmer. inserted statement n section.
Carefully read the question and answer accordingly.
Examine the PL/SQL Block
declare
result Number;
num1 Number:=&number1;
num2 Number:=&number2;
begin
select num1/num2 into result from dual;
dbms_output.put_line('Result is '||result);
exception
when ZEROS_DIVIDE then
dbms_output.put_line('Exception Occurred Divide by Zero');
end; Exception
/ Occurred
What will be the output of the above code when user passes Divide by Result is Result is Compilati
the value for NUM1 as 0 and NUM2 as 10 Zero 10 0 on fails

Carefully read the question and answer accordingly.


General Syntax for coding exception
DECLARE
Declaration Section
BEGIN
Exception Section
When ex_name 1 THEN
Error handling Statements
When Others THEN
Error handling Statements
When ex_name 1 THEN
Error handling Statements
END; TRUE FALSE
An
software
applicatio Every
n links up time a
with a software
Active applicatio
data n connect
objects, up with a
there is a database,
not much there is a
performan performan
ce value ce value
to be to be
paid. Not paid. Not
only that, only that,
You can programs programs
think of a that that
record as continuall continuall
A group of a variable y switch y switch
related data that can off off
items stored hold a between between
in fields , table row code and code and
each fields or some SQL can SQL can
has its own colums become become
Carefully read the question and answer accordingly. name and from a quite quite
Select the best definition for Why Collection needed in Oracle? datatype. table row. complex. complex.

Carefully read the question and answer accordingly.


Which of the following statements are true?
1.A collection is an ordered group of elements, all of the same
type
2.Each element in collection has a unique subscript that
determines its position in the collection.
3.A collection is a ordered group of elements of different types
4.Records are composite types that have internal components
that can be manipulated individually
5.Nested Table is also known as associative arrays 1&2 1&2&3 1&3&4 1&2&4

Carefully read the question and answer accordingly.


Which of the following statements are true?
Statement A: Index by Table is Also known as associative
arrays. It lets you to look up elements using arbitrary numbers Both Statement Statement Both
and strings for subscript values. statements A A Is false A is True statement
Statement B: Nested tables hold an arbitrary number of and B are and B is and B is s A and B
elements. They use sequential numbers as subscripts. False. True. False. are True.
When
Only few When
columns Program
of one or mer
more needs to
In a program tables define a
all the needs to customize
columns of a be d
table needs reference Failing to structure
to be d, stored do this for
referenced,st and will result accessing
Carefully read the question and answer accordingly. ored and processe in an error /storing
In which case we will use Custom record? processed. d. . data.

Carefully read the question and answer accordingly.


Examine the code snippet
declare
TYPE CITY is TABLE of varchar2(20) index by
PLS_INTEGER;
v1 CITY;
begin
v1(1):='Bangalore';
v1(6):='Mumbai';
v1(2):='Delhi';
dbms_output.put_line(v1.count()); Compiles
dbms_output.put_line(v1(2)); Compiles Compiles , executes
dbms_output.put_line(v1.next(6)); , executes , executes prints 3
end; Compilation prints 3 prints 3 Delhi
what will be the output of the above code? error Delhi Delhi 2 Mumbai

Carefully read the question and answer accordingly.


Which of the following statements are true?
1.Index by table has key value pair
2.Nested Table has key value pair
3.Index by Table is ordered based on its Key
4.Nested Table id ordered based on its key
5.In a key value pair key is unique 1&2 1&2&3 1&3&4 1&2&4

Carefully read the question and answer accordingly.


Examine the code snippet
declare
TYPE XYZ is VARRAY(10) of NUMBER;
v2 XYZ; --line 1
x Number:=0;
Begin
v2:=XYZ(1,2,3,4,5,6,7); --line 2
v2.delete(1); --line 3
while x < v2.last –line 4
loop
x:=x+1;
dbms_output.put_line(x); Compilati Compilati Compilati
end loop; on fails on fails on fails
end; Compilation due to due to due to
/ fails due to error on error on error on
What will be the output of the above code ? error on line 1 line 2 line 3 line 4
Carefully read the question and answer accordingly.
Examine the code snippet
declare
TYPE XYZ is VARRAY(10) of NUMBER;
v2 XYZ; -- line 1
x Number:=0;
Begin
v2:=XYZ(1,2,3,4,5,6,7);
v2.trim(1);--Line 2
while x < v2.last
loop
x:=x+1;
dbms_output.put_line(x); Compilati Compiles Compiles
end loop; on fails , executes , executes
end; Compilation due to an and prints and prints
/ fails due to an error on 1 , 2, ,3 , 1 , 2, ,3 ,
What will be the output of the above code? error on line 1 line 2 4, 5, 6, 7 4, 5, 6

Carefully read the question and answer accordingly.


DECLARE
TYPE StockItem IS RECORD(
item_no Item_master.Item_code%TYPE,
item_name Item_master.Item_name%TYPE,
quantity Stock.Current_stock%TYPE,
Unit_price Item_master.unit_price%TYPE);
St_rec StockItem; Cursor Custom Simple
Predict what type of record it fall under ? Table Record Record Record Record
Carefully read the question and answer accordingly.
Predict which collection has ability to have elements selected Nested Associativ None of
Individually in database. Varray Table e Array the above

Carefully read the question and answer accordingly.


Examine the code snippet
declare
TYPE ABC is VARRAY(10) of NUMBER; If
v2 ABC; v2:=ABC(
begin ); is
v2:=ABC(); removed
v2.extend(); Compiles than the Compiles
v2(1):=78; Code , executes code will fine and
Dbms_output.put_line(v2(1)); contains a without compile prints the
end; compilation any and print output as
what will be the output of the above code ? error output 78 78

Carefully read the question and answer accordingly.


Examine the code snippet
declare
TYPE ABC is VARRAY(10) of NUMBER;
v2 ABC:=ABC(10,8,9,6,5,4,3,32);
begin
Dbms_output.put_line(v2(1)); Compiles Compiles Compiles
end; Compilation and prints and prints and prints
what will be the output of the above code ? fails 8 10 1
Carefully read the question and answer accordingly.
Which of the following statements are true?
Statement A : Arrays have a fixed upper bound, but nested
tables are unbounded Both Statement Statement Both
Statement B : Second, arrays must have consecutive statements A A Is false A is True statement
subscripts and nested tables are dense, but they can be and B are and B is and B is s A and B
sparse (have non-consecutive subscripts). False. True. False. are True.

Carefully read the question and answer accordingly.


Which of the following statements are true
Statement A :The body of the FORALL statement must contain
a single DML operation. Both Statement Statement
Statement B: The EXECUTE IMMEDIATE statement prepares statements A Both A A Is false A is True
(parses) and immediately executes a dynamic SQL statement and B are and B are and B is and B is
or an anonymous PL/SQL block. False True True False

Carefully read the question and answer accordingly. Associativ None of


Predict which collection has ability to preserve element order. Nested Table e Array Varray the above

1. Add a 1. Add a
new new
genre. 2. genre. 2.
Is this Display
genre id the total #
already in of
1. Add a new 1. Add a the elements.
genre. 2. Is new collection 3. **Add**
Carefully read the question and answer accordingly. this genre id genre. 2. ? 3. another
IF add_genre_new THEN already in the Display **Add** element
IF NOT fic_genres.EXISTS(f_genre_id) THEN collection? 3. the total # another to the
fic_genres.EXTENDS(1); Display the of element varray. 4.
fic_genres(f_genre_id) := f_genre; total # of elements. to the Is this
DBMS_OUTPUT.PUT_LINE('Total # of entries in elements. 4. 3. **Add** varray. 4. genre id
fiction_genres is : **Add** another Display already in
'||fiction_genres.COUNT(); another element the total # the
END IF; element to to the of collection
Predict the correct steps of the above code ? the varray. varray. elements. ?
Carefully read the question and answer accordingly.
HTML is used to perform the programming logic.
State True or False. FALSE TRUE
Carefully read the question and answer accordingly.
Which of the following is an empty tag in HTML? <a> <br> <input> <h1>

Alternativ
e text to
be
displayed
if the
ID used to image is None of
Carefully read the question and answer accordingly. Image identify not the listed
ALT' attribute in <IMG> tag used to represents filename the image displayed options
Which
represents Provides
the content to additional Attribute None of
Carefully read the question and answer accordingly. be displayed behaviour is a type the listed
What is the use of attributes in HTML tags? in the page to the tag of tag options
Carefully read the question and answer accordingly. None of
Which tag is used to include multiple HTML pages in single the listed
page? frame frameset frames options
Carefully read the question and answer accordingly. By using By using
How to divide the page into two rows when we are using cols=50%,50 rows=50 By using By using
frameset? % %,50% colspan rowspan

Carefully read the question and answer accordingly.


How to divide the page into two equal halves when we are
using frameset ?
1.By using cols=50%,50%
2.By using rows=50%,50%
3.By using colspan
4.by using rowspan 1&2 3&4 2&3 1&4
Carefully read the question and answer accordingly.
The below html meta tag will reload page automatically every
60 ______ . nanoseco millisecon
<meta http-equiv="refresh" content="60"> seconds minutes nds ds
Carefully read the question and answer accordingly.
Which of the following is not an attribute of meta tag? content name value http-equiv
Carefully read the question and answer accordingly.
Automatic page Refresh can be done by using refresh Meta
Tag.
State True or False. TRUE FALSE

Carefully read the question and answer accordingly.


Which of the following are the functions of caching?
1.Temporarily storing the web page in the client
2.Reduce the network traffic
3.Decrease the speed of the response
4.Increase the speed of the response 1&2 1&2&3 1&3&4 1&2&4

Carefully read the question and answer accordingly.


Consider Vijay is developing web page using HTML.Which
method he can use for sending data securely on submitting the
form? None of
I: POST the listed
II: GET I II Both I & II options

Carefully read the question and answer accordingly.


Consider Vijay is developing web page using HTML.Which
method he can use for sending large amount of data on
submitting the form? None of
I: POST the listed
II: GET I II Both I & II options

Carefully read the question and answer accordingly.


Consider Vijay is developing web page using HTML. He All of the
wants user to enter some data which is multiline data. What listed
must be the form element or control to be used by him? TextBox TextArea Text options
Carefully read the question and answer accordingly.
Which tag creates containers to other HTML tags/elements? None of
I: DIV the listed
II: SPAN I II Both I & II options
Carefully read the question and answer accordingly.
Which tag is used if we want to apply same styles for a block of
elements? None of
I: DIV the listed
II: SPAN I II Both I & II options
Carefully read the question and answer accordingly.
If we want to apply a style for a text or a part of a text which tag
will be used? None of
I: SPAN the listed
II: DIV I II Both I & II options
Carefully read the question and answer accordingly.
DIV tag creates linebreaks similar to paragraph tags.
State True or False. TRUE FALSE

Carefully read the question and answer accordingly.


Which of the following are valid variable declarations in Java
Script?
1.var x=3.14
2.var int x=4;
3.var x=4;
4.var country="INDIA" 1&2 1&2&3 1&3&4 1&2&4

Carefully read the question and answer accordingly.


Which of the following are valid identifiers in Java Script?
1._num
2.num
3.9char
4.$num 1,2&4 3&4 2&3 1&4

Carefully read the question and answer accordingly.


Variables in Java Script should be declared with data types.
State True or False. FALSE TRUE

Carefully read the question and answer accordingly.


Which of the following are used for executing client side script?
1.JavaScript
2.JSP
3.Servlets
4.VBScript 1&2 3&4 2&3 1&4

Java
Script can
be written
as an
JavaScrip external
JavaScript t can be file and
Carefully read the question and answer accordingly. can be written written imported All of the
Please select the correct statement with respect to including inside the inside the to the listed
JavaScript in HTML pages. page body header page options
document
document.get document .getEleme
Carefully read the question and answer accordingly. ElementsByT .getEleme ntsByTag None of
In JavaScript, for accessing first paragraph tag in the agName("p") ntsByTag Name("p[ the listed
document which of the statement is used? [0] Name("p") 0]") options

document document
.getEleme .getEleme
document.get ntsByTag ntsByTag
Carefully read the question and answer accordingly. ElementsByT Name("p") Name("p[ None of
In JavaScript, for reading the contents inside the first agName("p").i [0].innerT 0]").innert the listed
paragraph tag which statement is used? nnertext() ext; ext() options
Carefully read the question and answer accordingly.
Consider Vijay is developing a web application. Which method getEleme None of
he can use to get a collection of elements of same type (for getElementBy getEleme ntsByTag the listed
example paragraph tags) in Java Script? Name() ntById() Name() options

Carefully read the question and answer accordingly.


What will be the output of the following Java Script code when
the button is clicked?
<body>
<script type="text/javascript">
function displayMessage(){ It will
document.write("Displaying message by using javaScript"); It will print the display
} message some
</script> "Displaying error
<button type="button" onclick="DISPLAYMESSAGE()">Display message by It will not message None of
Message</button> using print the on the listed
</body> javaScript" message browser options
Carefully read the question and answer accordingly. <xml <?xml <?xml None of
What is the correct syntax of the declaration which defines the version="1.0" version=" version=" the listed
XML version? /> 1.0"?> 1.0" /> options
<!
ELEMEN <!
T ELEMEN
element- T
<! ELEMENT name(ele element-
element- ment- name(ele None of
Carefully read the question and answer accordingly. name(elemen content+)! ment- the listed
How to declare element with minimum one occurrence? t-content+)> > content)!> options
<messag <messag
e> if price e> if price
<message> if lt 60 &lt; None of
Carefully read the question and answer accordingly. price<60</me </messag 60</mess the listed
Which of the following XML statement is valid? ssage> e> age> options
Document Dynamic None of
Carefully read the question and answer accordingly. Direct Type Type Type the listed
What does DTD stands for? Definition Definition Definition options
An
Applicatio
n can use
DTD are the DTD
used as to validate
contract the XML
between structure
DTD are used two it has
by parsers for systems received
Carefully read the question and answer accordingly. validating the to from All of the
Which of the following correctly defines use of DTD in XML structure of interopera external listed
development? the XML te. systems options
Carefully read the question and answer accordingly.
Any text that should not be parsed by the xml parser needs to
declare as: None of
I: PCDATA the listed
II: CDATA I II Both I & II options
eXtensibl Example
Carefully read the question and answer accordingly. eXtra Modern e Markup Markup X-Markup
What does XML stand for? Link Language Language Language
None of
Carefully read the question and answer accordingly. the listed
Which parser is a W3C standard? SAX DOM XHTML options
Carefully read the question and answer accordingly.
What are the uses of XML parsers?
1.Parsing XML files and retrieving data from XML elements
2.Creating XML files programmatically
3.Used to direct conversion using an XSLT processor 1&2 2 2&3 1
Carefully read the question and answer accordingly.
Which parser reads small chunk of document at a time,parses None of
it, generate an events and then reads another chunk of the listed
document DOM SAX XML options
None of
Carefully read the question and answer accordingly. the listed
Which defines standard set of objects for creating XML's? SAX XMLDOM XML options
Carefully read the question and answer accordingly. None of
Which type of parser is suitable,when applications is required the listed
to read data without modifying the content DOM SAX XML options

Document
Builder
DocumentBuil Document b=factory.
der b=new Builder new None of
Carefully read the question and answer accordingly. DocumentBuil b=new Document the listed
Which statement creates DocumentBuilder instance? der(); Builder(); Builder(); options
Extensibl
Extensive Extensibl e Style None of
Carefully read the question and answer accordingly. Style sheet e Style Sheet the listed
What does XSL stands for? language Language Language options
Document
BuilderFa
Document ctory
DocumentBuil BuilderFa f=Docume
derFactory ctory f= ntBuilderF
f=new BuilderFa actory.ne None of
Carefully read the question and answer accordingly. DocumentBuil ctory.newI wInstance the listed
Which statement creates DocumentBuilderFactory instance? derFactory(); nstance(); (); options
None of
Carefully read the question and answer accordingly. the listed
Which language is used for formatting XML documents? XSL XSLT XSL-FO options
None of
Carefully read the question and answer accordingly. the listed
Which is used to transform XML document? Xpath XSLT XSL options
Carefully read the question and answer accordingly.
What are the two common exceptions in JAXP?
1.ParserConfigurationException
2.FactoryConfigurationException
3.FactoryConfigurationError 1&2 3 1&3 1
Java API
eXtensibl Java API
Java API e for XML None of
Carefully read the question and answer accordingly. eXtensive Processin Processin the listed
JAXP Stands for: processing g g options
None of
Carefully read the question and answer accordingly. javax.xml.par javax.xml. javax.pars the listed
In which package JAXP related API's are available? sers.*; *; ers.xml.*; options

<xs:compl <xs:compl
exType exType
name="C name="C
ountrInfo" ountrInfo"
><xs:choi ><xs:seq
ce> uence>
<xs:eleme <xs:eleme
<xs:complexT nt nt
ype name="co name="co
name="Count untryNam untryNam
rInfo"><xs:all e" e"
> <xs:element type="xs:s type="xs:s
name="countr tring"/> tring"/>
yName" <xs:eleme <xs:eleme
type="xs:strin nt nt
g"/> name="st name="st
<xs:element ates" ates"
name="states type="xs:i type="xs:i
" nteger"/> nteger"/>
type="xs:integ </xs:choic </xs:sequ
Carefully read the question and answer accordingly. er"/></xs:all> e></xs:co ence></x None of
Which complex type specifies that the elements should always </xs:complex mplexTyp s:complex the listed
be in the order specified? Type> e> Type> options
<xs:eleme <xs:eleme
nt nt
<xs:element name="C name="C
name="Count ountryNa ountryNa
ryName" me" me"
type="xs:strin type="xs:s type="xs:s
Carefully read the question and answer accordingly. g" tring" tring" None of
Which statement specifies a constant value for a simple constant="Ind fixed="Ind fixedvalue the listed
element? ia"/> ia"/> ="India"/> options

<xs:compl <xs:compl
exType exType
name="C name="C
ountrInfo" ountrInfo"
><xs:choi ><xs:seq
ce> uence>
<xs:eleme <xs:eleme
<xs:complexT nt nt
ype name="co name="co
name="Count untryNam untryNam
rInfo"><xs:all e" e"
> <xs:element type="xs:s type="xs:s
name="countr tring"/> tring"/>
yName" <xs:eleme <xs:eleme
type="xs:strin nt nt
g"/> name="st name="st
<xs:element ates" ates"
name="states type="xs:i type="xs:i
" nteger"/> nteger"/>
type="xs:integ </xs:choic </xs:sequ
Carefully read the question and answer accordingly. er"/></xs:all> e></xs:co ence></x None of
Which complex type signifies that only one of the child </xs:complex mplexTyp s:complex the listed
elements can appear? Type> e> Type> options

Carefully read the question and answer accordingly.


As per Java coding standard class names should be nouns, in
mixed case
with the first letter of each internal word capitalized.
Try to keep your class names simple
and descriptive.
State True or False. TRUE FALSE

Carefully read the question and answer accordingly.


Select the right coding best practices followed while using java
Collections.
1.Use for loop instead of iterator
2.Use Collections with generic with same type of data.
3.Copy collections into other collections by calling addAll()
methods instead using iterator to copy each collection
element. 1&2 2&3 1&3 3
Carefully read the question and answer accordingly.
Consider the following code snippet:
import org.junit.*;
import static org.junit.Assert.*;
import java.io.*;
public class OutputTest {
private File output;
@Before
public void createOutputFile() {
output = new File(...);
}
@After
public void deleteOutputFile() {
output.delete();
}
@Test createOut testSomet deleteOut
public void testSomethingWithFile() { createOutput putFile() hingWithF putFile()
... File() testSomet ile() createOut
} deleteOutput hingWithF createOut putFile()
} File() ile() putFile() testSomet
Which of the following option gives the order in which the testSomethin deleteOut deleteOut hingWithF
methods in the above given OutputTest class is executed? gWithFile() putFile() putFile() ile()

Carefully read the question and answer accordingly.


Select correct naming convention used during class
declaration.
1.Class name should be nouns
2.Should be simple & descriptive
3.Class name starts with lower case.
4.Class name can be java valid keyword. 1&2 3&4 2&3 1&4
Carefully read the question and answer accordingly.
Documentation comments are meant to describe the
specification of the code to be read by developers.
State True or False. TRUE FALSE

Carefully read the question and answer accordingly.


Which tool verifies for best practice adherence?
1.PMD
2.Check Style
3.CPD
4.ANT 1&2 1&2&3 1&3&4 1&2&4
Possible
performan
Violation ce All of the
Carefully read the question and answer accordingly. Coding of best bottleneck listed
What are the major areas PMD tool scans java code? standards practice s options
Carefully read the question and answer accordingly. Checkstyl
Which of the following is build tool? ANT PMD e CPD

Carefully read the question and answer accordingly.


Choose a valid package name in Java?
1.com.sun.eng
2.123pack
3.pack123
4.outerpack_innerpack 1&2 1&2&3 1&3&4 1&2&4
Improves Improves
Carefully read the question and answer accordingly. Improves Easy Easy All of the
Select the advantages of using coding conventions in java Readability of understan Maintena listed
application development. the software ding nce options

Carefully read the question and answer accordingly.


public class MethodSigExample
{
public int test(String s, int i)
{
int x = i + s.length();
return x;
}
} Refactor >
Change Refactor Refactor
During refactoring method signature can be changed using the Method Refactor > Extract > move
option: Signature > move method Method

Carefully read the question and answer accordingly.


What are the types of refactoring?
1.Physical Structure
2.Logical Structure
3.Method Level
4.Class Level Structure 1&2 3&4 2&3 1&4

Carefully read the question and answer accordingly.


What are the Tools & plug-ins commonly used in testing java
application code?
1.ANT
2.JUnit
3.JavaScript
4.EMMA 1&2 3&4 2&3 2&4
Carefully read the question and answer accordingly.
What are the benefits of Logging?
1.Debug applications issues easily
2.Detect complier errors easily
3.Trouble Shoot performance problems 1&2 2&3 1&3 3

Carefully read the question and answer accordingly.


Select the benefits of versioning the software in java
application development.
1.Backup and Restore
2.WinZIP
3.Synchronization
4.Branching and merging
5.Formatting 1&2 1&2&3 1&3&4 1&2&4
Carefully read the question and answer accordingly.
An art of identifying, organizing, controlling and verifying the
modification to the software work products built by the
developer. SDLC SVN SCM HCM
Carefully read the question and answer accordingly. static
Which of these is executed first before execution of any other finalize block private
thing takes place in a program? main method method code method
By
By multitaski
multithreadin ng CPU’s A thread
g CPU’s idle idle time can exist
time is is Two only in
minimized, minimized thread in two
and we can , and we Java can states,
take can take have running
Carefully read the question and answer accordingly. maximum use maximum same and
Which of the following statement is incorrect? of it. use of it. priority blocked.
Carefully read the question and answer accordingly.
Consider a development scenario where you want to write the
object data into persistence storage devices (like file, disk
etc.).Using which of the below concept you can achieve the Serializati Synchroni Deserializ
given requirement? finalization on zation ation

Carefully read the question and answer accordingly.


In Thread implementation making method synchronized is
always better in order to increase application performance
rather than using synchronize block to synchronize certain
block of statements written in java inside the method.
State True or False. FALSE TRUE

InputStre
am and
Carefully read the question and answer accordingly. OutputStr
Consider you are developing an application where you have to Reader and eam None of
store and retrieve data in character format in file. Which API Writer Stream Stream Collection the listed
you will use to store and retrieve the data in character format? APIs APIs APIs options

Carefully read the question and answer accordingly.


Consider you are developing a JDBC application, where you
have to retrieve quarterly report from database by executing
database store procedure created by database developer. None of
Which statement API you will use to execute store procedure Prepared CallableSt the listed
and retrieve ResultSet information? Statement Statement atement options

If the If the If the


equals() hashCode hashCode
method () ()
returns comparis comparis
If the equals() false, the on == on ==
method hashCode returns returns
returns true, () true, the true, the
Carefully read the question and answer accordingly. the comparis equals() equals()
Which statements are true about comparing two instances of hashCode() on == method method
the same class, given that the comparison might must might
equals() and hashCode() methods have been properly == might return return return
overridden? return false true true true
When
designing
your own
collection
s class
(say, a
linked
list),
generics
and
parameter
ized types
allow you
Generics to achieve
and type
parameter safety
ized types with just a
eliminate single
Generics the need class
provide type for down definition
safety by casts as
shifting more when opposed
type checking using to
Carefully read the question and answer accordingly. responsibilitie Java defining All of the
Which of the following is incorrect statement regarding the use s to the Collection multiple mentione
of generics and parameterized types in Java? compiler. s. classes. d
Carefully read the question and answer accordingly.
Which collection class allows you to grow or shrink its size and java.util.Li
provides indexed access to its elements, but whose methods java.util.Hash nkedHash java.util.Li java.util.A
are not synchronized? Set Set st rrayList

Carefully read the question and answer accordingly.


Consider you are developing an ATM application for ABC Bank
using java application. Several account holders of ABC Bank
have opted for add-on cards. There is a chance that two users
may access the same account at same time and do transaction
simultaneously knowingly or unknowingly from different ATM
machine from same or different bank branches. As developer
you have to ensure that when one user login to account until Using Using
he finishes his transaction account should be locked to other Using Thread object object None of
users who are trying access the same account. How do you Synchronizati serializati deserializ the listed
implement given requirement programmatically using java? on on ation options

Carefully read the question and answer accordingly.


Consider you are developing a JDBC application, where you
have to retrieve the Employee information from the database
table based on Employee id value passed at runtime as None of
parameter. Which best statement API you will use to execute Prepared CallableSt the listed
parameterized SQL statement at runtime? Statement Statement atement options
Carefully read the question and answer accordingly.
You need to store elements in a collection that guarantees that
no duplicates are stored and all elements can be accessed in java.util.S java.util.Li java.util.C
natural order. Which interface provides that capability? java.util.Map et st ollection

Carefully read the question and answer accordingly.


Consider you are developing shopping cart application you
have to store details of items purchased by the each customer
in intermediate memory before storing purchase details in
actual database permanently note that number of different Implemen
items purchased by customer is not definite it may vary. How t using Implemen None of
do you implement given requirement using java considering Implement Collection t using file the listed
best performance of the application? using Arrays API’s. API’s options

Carefully read the question and answer accordingly.


Consider you are developing a JDBC application, where you
have to retrieve Employee table schema information like table
columns name, columns field length and data type etc. Which ResultSet DataSour
API you will use to retrieve table schema information? ResultSet MetaData ce Statement

Carefully read the question and answer accordingly.


Consider the development scenario where you have created
Employee class with implementation code and as per the
project requirement you have to ensure that developer in team Mark Mark Make Make
reusing code written in Employee class only using inheritance Employee Employee Employee Employee
by extending the employee class but not by creating the class with class with class class
instance of Employee object directly. Please suggest the abstract final methods methods
solution to implement given requirement? keyword keyword private public

Carefully read the question and answer accordingly.


Consider you are developing java application in a team
consists of 20 developers and you have been asked to develop Declare
class by Name ProgrammerAnalyst and to ensure that other the Declare
developers in team use ProgrammerAnalyst class only by Program the
creating object and team member should not be given Declare the merAnaly Program
provision to inherit and modify any functionality written in ProgrammerA st class merAnaly None of
ProgrammerAnalyst class using inheritance. How do you nalyst class has st class the listed
achieve this requirement in development scenario? has abstract private has final options

Both of
Any one will them will It is
be executed be None of dependen
Carefully read the question and answer accordingly. first executed them will t on the
What will happen if two thread of same priority are called to be lexographicall simultane be operating
processed simultaneously? y ously executed system.
Carefully read the question and answer accordingly.
In Thread implementation methods like wait(), notify(),
notifyAll() should be used in synchronized context .
State true or false TRUE FALSE

Carefully read the question and answer accordingly. java.lang.


Which class does not override the equals() and hashCode() java.lang.Stri java.lang. StringBuff java.lang.
methods, inheriting them directly from class Object? ng Double er Character
Carefully read the question and answer accordingly.
Interfaces are mainly used to expose behavior or functionality
not the implementation code.
State true or false TRUE FALSE

Allows
interopera Reduces
bility effort to
Carefully read the question and answer accordingly. Reduces among learn and Fosters
Select the advantages of using Collection API’s in java programming unrelated to use software
application development. effort APIs new APIs reuse

Carefully read the question and answer accordingly. Non of


Which of the following provides an efficient means of storing LinkedHa the listed
key/value pairs in sorted order, and allows rapid retrieval? TreeMap HashMap shMap options

Check
Check whether
whether you have
Check you have marked
Carefully read the question and answer accordingly. whether you implemen Customer
Consider you are trying to persist or store object of Customer have ted class
class using ObjectOutputStream class in java. When you are implemented Customer methods
trying to persist customer object data java code is throwing Customer class with with
runtime exception without persisting object information. Please class with Externaliz synchroni None of
suggest what is the key important factor you have consider in Serializable able zed the listed
code in order to persist customer object data. interface interface keyword options

Carefully read the question and answer accordingly.


The below procedure raises exception using
RAISE_APPLICATION_ERROR when we try to delete a
department that is not available in the below table else to
diplay a message that the department is <available> Deleted.
TABLE DATA : tbl_departments
DEPARTMENTID DESCRIPTION
20 Science
30 Economics
40 Statistics
50 History
CODE:
CREATE OR REPLACE PROCEDURE
Available_Dept(P_DeptId tbl_departments.departmentid
%TYPE) IS
BEGIN
DELETE FROM tbl_departments WHERE departmentid =
P_DeptId;
IF SQL%NOTFOUND THEN
RAISE_APPLICATION_ERROR (-20201, P_DeptId || ' does
not exist');
ELSE
DBMS_OUTPUT.PUT_LINE('Department details are
<Available>Deleted');
END IF;
END Available_Dept; TRUE FALSE
DECLAR
E TYPE
DECLAR EmpRec
E TYPE IS
EmpRec RECORD
IS ( emp_id
RECORD emp.emp
( emp_id no
emp.emp %TYPE,
no job_title
%TYPE, VARCHA
job_title R2(9),
DECLARE VARCHA salary
TYPE R2(9), NUMBER
EmpRec IS salary (7,2));
RECORD NUMBER emp_info
( emp_id (7,2)); EmpRec;
emp.empno emp_info emp_null
%TYPE, EmpRec; EmpRec;
job_title BEGIN BEGIN
VARCHAR2( emp_info. emp_info.
9), salary emp_id := emp_id :=
NUMBER(7,2 7788; 7788;
)); emp_info emp_info. emp_info.
EmpRec; job_title := job_title :=
BEGIN 'ANALYS 'ANALYS
emp_info.em T'; T';
p_id := 7788; emp_info. emp_info.
emp_info.job salary := salary :=
_title := 3500; 3500;
'ANALYST'; emp_info emp_info
Carefully read the question and answer accordingly. emp_info.sala := :=
Which code assign null to all the fields in the record ry := 3500; emp_null; emp_null; None of
emp_info? END; END; END; the above
Carefully read the question and answer accordingly.
Join queries are better in performance than Subqueries.
State true or false. TRUE FALSE
CREATE
TRIGGER CREATE
log_errors TRIGGER
AFTER AFTER
SERVER SERVER
ERROR ERROR
ON ON
DATABA DATABA
SE SE
CREATE BEGIN IF BEGIN IF
TRIGGER (IS_SERV (IS_SERV
log_errors ERERRO ERERRO
BEGIN IF R (1017)) R (1017))
(IS_SERVER THEN THEN
ERROR <special <special
(1017)) THEN processin processin
<special g of logon g of logon
processing of error> error>
logon error> ELSE ELSE
ELSE <log <log error <log error
Carefully read the question and answer accordingly. error number> number>
Which of the trigger is used to log all errors and also to do number> END IF; END IF; None of
some special processing when the log error is 1017? END IF; END; END; END; the above

Carefully read the question and answer accordingly.


XYZ Company database tables are accessed by several users
but few users want to do positional row updates or deletes
operation on databases tables based on business requirement. Use Use
What will the right solution you will implement in such Use database database
scenario? Use Views Cursors Indexes Trigger

Carefully read the question and answer accordingly.


Consider you are maintaining ABC company database. ABC
company database tables are accessed by 1000 users initially
when it was designed from last two years there was
tremendous increase in number records count also number of
users who are accessing the database tables to fetch results.
Users of ABC company database are reporting problem that
query processing is taking more time when they execute query Create
against the database tables. What will the right solution you will Stored
suggest in such scenarios in order to increase database query Create Procedur Create Create
performance? Function e index Trigger
IS emp_rec
RECORD IS
( employe RECORD
eid ( employe
NUMBER, eid
CREATE OR firstname NUMBER,
REPLACE VARCHA firstname
PACKAGE R2(10), VARCHA
employee_pa lastname R2,
ckage AS VARCHA lastname
TYPE R2(10), VARCHA
emp_rec IS salary R2, salary
RECORD NUMBER NUMBER
( employeeid ); );
NUMBER, minimum_ minimum_
firstname count count
VARCHAR2( CONSTA CONSTA
10), lastname NT NT
VARCHAR2( NUMBER NUMBER
10), salary := 4; := 4;
NUMBER); FUNCTIO FUNCTIO
minimum_cou N N
nt get_empl get_empl
CONSTANT oyee oyee
NUMBER := RETURN RETURN
4; FUNCTION emp_rec; emp_rec;
get_employe PROCED PROCED
Carefully read the question and answer accordingly. e RETURN URE URE
Which is the valid Package specification for the below emp_rec; update_s update_s
requirements. PROCEDUR alary alary
1) A procedure to update each professors salary E (employe (employe
2) A function to return the professor details who receive less update_salar eid IN eid IN
salary compared to others. y (employeeid NUMBER NUMBER
3) A REF CURSOR to be declared IN NUMBER); ); END ); END
4) A employee record with employeeid , employee name , END employee employee None of
salary. employee_pa _package _package the listed
5) A constant with datatype NUMBER with value 4 ckage; ; ; options

Easier
maintena
nce. If a
Global business
Faster enforcem policy
application ent of changes, Improve
development. business you need performan
Because the rules. to change ce in
database Define a only the client/serv
stores trigger correspon er
triggers, you once and ding environm
do not have then trigger ent. All
to code the reuse it program rules run
trigger for any instead of in the
actions into applicatio each server
Carefully read the question and answer accordingly. each n that applicatio before the
Which of the following is the benefits using triggers in database database uses the n result
management system? application. database. program. returns.
Carefully read the question and answer accordingly.
What is the collection exception raised for the below code?
DECLARE
TYPE NumList IS TABLE OF NUMBER;
nums NumList;
BEGIN SUBSCRIPT_ COLLEC NO_DAT
nums(1) := 1; BEYOND_CO TION_IS_ A_FOUN VALUE_E
END; UNT NULL D RROR

Carefully read the question and answer accordingly.


Can the function get_employees be called in an SQL
statement as below ,
SELECT departmentid, description ,
get_employees(maxsalary) "Employeeid"
FROM tbl_departments
WHERE maxsalary = 3000 TRUE FALSE

Carefully read the question and answer accordingly.


What error the following code will display?
DECLARE
dynamic_stmt VARCHAR2(200);
dummy BOOLEAN;
FUNCTION get_x (x INTEGER)
RETURN BOOLEAN
AS
BEGIN
NULL;
END get_x; "Cannot "Expressi
BEGIN string in ons have
dynamic_stmt := 'BEGIN :b := get_x(5); END;'; current "String is to be of None of
EXECUTE IMMEDIATE dynamic_stmt USING OUT dummy; PLSQL not SQL the listed
END; session" active" types" options

SELECT
dept_id, SELECT
MIN dept_id,
(salary), SELECT MIN
MAX dept_id, (salary),
(salary) MIN(salar MAX
Carefully read the question and answer accordingly. FROM y), (salary)
Examine the description of the employees table: SELECT employee MAX(sala FROM
EMP_ID NUMBER (4) NOT NULL dept_id, MIN s WHERE ry) FROM employee
LAST_NAME VARCHAR2 (30) NOT NULL (salary), MAX MIN employee s GROUP
FIRST_NAME VARCHAR2 (30) (salary) (salary) < s BY
DEPT_ID NUMBER (2) FROM 2000 HAVING dept_id
JOB_CAT VARCHAR (30) employees AND MAX MIN HAVING
SALARY NUMBER (8, 2) WHERE (salary) > (salary) < MIN(salar
Which of the following SQL statements shows the department MIN(salary) < 5000 2000 y) < 2000
ID, minimum salary, and maximum salary paid in that 2000 AND GROUP AND MAX AND MAX
department, only if the minimum salary is less than 2000 and MAX (salary) BY (salary) > (salary) >
maximum salary is more than 5000? > 5000 dept_id 5000 5000
Carefully read the question and answer accordingly.
In the Student Management system we have a table called
STUDENTS, COURSES, ENROLLMENTS with below data
TABLE DATA - STUDENTS:
STUDENTID FIRSTNAME LASTNAME
10001 Francis Peter
10002 Venkat Prasad
TABLE DATA - COURSES:
COURSEID DEPARTMENTID COURSENAME
1112 20 Science
1113 30 Economics
The below procedure is used to identify the coursenames in
the department 20.
CREATE OR REPLACE PROCEDURE
proc_coursename(p_deptid IN courses.departmentid%TYPE)
AS
v_coursename VARCHAR2(10);
CURSOR c_coursename IS
SELECT coursename
FROM courses
WHERE departmentid = p_deptid;
BEGIN
FOR v_rec_coursename IN c_coursename LOOP
DBMS_OUTPUT.PUT_LINE('The course in Department ID:'||'
'||p_deptid||' '||'is'||' '||v_rec_coursename.coursename);
END LOOP;
END proc_coursename; TRUE FALSE

Carefully read the question and answer accordingly.


Views are a powerful mechanism for customizing the way your
data is presented to users. They can be used to enhance
security and streamline complex table relationships. Views that
create static results can still be modified using ________, Stored
which allow you to define how the underlying tables are Procedur
modified ensuring your data integrity. Triggers e Functions Cursors

Carefully read the question and answer accordingly.


Which error will be raised for the below code?
DECLARE
TYPE tb_numbers_nt IS TABLE OF NUMBER;
l_numbers tb_numbers_nt; "Referenc
BEGIN e to
l_numbers.EXTEND; uninitializ None of
l_numbers(1) := 1; "Value not ed the listed
END; No error initialized" collection" options
me IS d= d=
SELECT p_student e.studenti
co.coursena id AND d AND
me FROM s.studenti e.coursei
TBL_students d = d=
s, courses e.studenti co.coursei
co , d AND d; BEGIN
enrollments e e.coursei FOR
WHERE d= v_rec_co
s.studentid = co.coursei ursename
p_studentid d; BEGIN IN
AND FOR c_course
s.studentid = v_rec_co _name
e.studentid ursename LOOP
AND IN v_studenti
e.courseid = c_course d :=
co.courseid; _name p_student
Carefully read the question and answer accordingly. BEGIN FOR LOOP id;
In the Student Management system we have a table called v_rec_course DBMS_O DBMS_O
STUDENTS, COURSES, ENROLLMENTS with below data name IN UTPUT.P UTPUT.P
TABLE DATA - STUDENTS: c_course_na UT_LINE( UT_LINE(
STUDENTID FIRSTNAME LASTNAME me LOOP 'Student 'Student
10001 Francis Peter v_studentid := With ID:'||' With ID:'||'
10002 Venkat Prasad p_studentid; '|| '||
TABLE DATA - COURSES: DBMS_OUTP v_studenti v_studenti
COURSEID DEPARTMENTID COURSENAME UT.PUT_LIN d||' d||'
1112 20 Science E('Student '||'Major '||'Major
1113 30 Economics With ID:'||' '|| Subject Subject
TABLE DATA - ENROLLMENTS: v_studentid||' is'||' '|| is'||' '||
COURSEID SECTION STUDENTID '||'Major v_rec_co v_rec_co
1112 A 10001 Subject is'||' '|| ursename ursename
1113 B 10002 v_rec_course .coursena .coursena
Which PLSQL procedure is used to display the student details name.course me); END me); END
along with the course names they have enrolled. name); END LOOP; LOOP;
NOTE : STUDENTID should be passed as parameter. LOOP; END END END None of
SAMPLE OUTPUT : Student with ID:10001 Major subject is get_Coursen get_Cour get_Cour the listed
Science. ame; sename; sename; options

Carefully read the question and answer accordingly.


XYZ Company database tables are accessed by several users
but for few users need to be provided provision for updating
information like address, phone number, email address in
secured manner without providing direct access to underlying Use Use
database base tables. What will the right solution you will Use database database
implement in such scenario to meet requirement? Create Views Cursors functions Trigger
CREATE
TABLE
EMP
(empno CREATE
CREATE NUMBER TABLE
TABLE (4), EMP
EMP ename (empno
CREATE (empno VARCHA NUMBER
TABLE EMP NUMBER R2(35), (4),
(empno (4), deptno ename
NUMBER (4), ename NUMBER VARCHA
ename VARCHA (7,2) NOT R2(35),
VARCHAR2 R2 (35), NULL, deptno
(35), deptno deptno CONSTR NUMBER
NUMBER(7,2 NUMBER AINT (7,2)
) NOT (7,2) emp_dept FOREIGN
NULL,CONS CONSTR no_fk KEY
TRAINT AINT FOREIGN CONSTR
emp_deptno_ emp_dept KEY(dept AINT emp
fk FOREIGN no_fk no) deptno fk
KEY deptno REFERE REFERE REFERE
Carefully read the question and answer accordingly. REFERENCE NCES NCES NCES
Which of the following SQL statements defines a FOREIGN S dept dept dept(dept dept(dept
KEY constraint on the deptno column of the EMP table? deptno) (deptno)) no)) no))
e coursena coursena
VARCHAR2( me INTO me INTO
20); v_deptid v_coursei v_coursei
NUMBER; d,v_depti d,v_depti
BEGIN d,v_cours d,v_cours
SELECT ename ename
courseid FROM FROM
,departmentid courses courses
, coursename WHERE WHERE
INTO coursena coursena
v_courseid,v_ me like me like
deptid,v_cour 'p_course p_course|
sename %'; |'%';
FROM DBMS_O DBMS_O
courses UTPUT.P UTPUT.P
WHERE UT_LINE( UT_LINE(
coursename 'Course 'Course
like Available Available
p_course||'%'; with with
DBMS_OUTP departme departme
UT.PUT_LIN nt ID:'||' '|| nt ID:'||' '||
E('Course v_deptid); v_deptid);
Available with EXCEPTI EXCEPTI
department ON ON
ID:'||' '|| WHEN WHEN
v_deptid); NO_DAT TOO_MA
EXCEPTION A_FOUN NY_ROW
WHEN D THEN S THEN
NO_DATA_F DBMS_O DBMS_O
OUND THEN UTPUT.P UTPUT.P
DBMS_OUTP UT_LINE( UT_LINE(
UT.PUT_LIN 'No 'No
Carefully read the question and answer accordingly. E('No Course Course Course
Which procedure raises an exception 'NO DATA FOUND' Available'); Available') Available')
when the student searches for the course which is not END ; END ; END None of
available else to display Available_maj Available Available the listed
a message that the course is available. or; _major; _major; options
10); v_grade TBL_GRA p_grade;
NUMBER; DE g, BEGIN
CURSOR COURSE OPEN
c_grade IS S co c_grade;
SELECT WHERE LOOP
g.studentid, g.coursei FETCH
co.coursena d = c_grade
me FROM co.coursei INTO
TBL_GRADE d AND v_studenti
g, COURSES g.grade = d ,
co WHERE p_grade; v_course
g.courseid = BEGIN name;
co.courseid OPEN EXIT
AND g.grade c_grade; WHEN
= p_grade; LOOP c_grade
BEGIN OPEN FETCH %NOTFO
c_grade; c_grade UND;
LOOP INTO v_grade :
FETCH v_studenti =
c_grade d, p_grade;
INTO v_course DBMS_O
v_studentid , name; UTPUT.P
Carefully read the question and answer accordingly. v_coursenam EXIT UT_LINE(
Which procedure gets the student id and the course name for e; WHEN 'Student
the given grade. DBMS_OUTP c_grade ID:'||' '||
TABLE DATA - COURSES: UT.PUT_LIN %NOTFO v_studenti
COURSEID DEPARTMENTID COURSENAME E('Student UND; d||'
1112 20 Science ID:'||' '|| v_grade : '||'grade
1113 30 Economics v_studentid||' = is'||' '||
TABLE DATA - TBL_GRADE: '||'grade is'||' p_grade; v_grade);
STUDENTID COURSEID YEAR SEMESTER '||v_grade); END END
GRADE END LOOP; LOOP; LOOP;
10001 1112 2014 'Second Semester' CLOSE CLOSE CLOSE
1 c_grade; c_grade; c_grade;
10002 1113 2015 'First Semester' END END END None of
2 proc_get_det proc_get_ proc_get_ the listed
SAMPLE OUTPUT : Student ID: 10001 grade is 1 ails; details; details; options
IF
old_comp
any_rec.n
ame =
new_com
pany_rec.
name
AND
old_comp
any_rec.i
ncorp_dat
e=
new_com
pany_rec.
incorp_da
te AND
old_comp
any_rec.a
ddress1 =
new_com
pany_rec.
IF address1
old_comp AND
any_rec > THEN ...
IF new_com the two Records
Carefully read the question and answer accordingly. old_company pany_rec) records cannot be
How do we compare records? _rec IS NULL THEN are compared
(old_company_rec, new_company_rec are 2 records with THEN -------.. -------- identical .. with each
name , incorp_date, address1 as fields) END IF; END IF; . END IF; other.

Carefully read the question and answer accordingly.


What exception the below code will raise?
DECLARE
TYPE tab_numbers IS TABLE OF NUMBER
INDEX BY PLS_INTEGER;
l_numbers tab_numbers; SUBSCRI
BEGIN NO_DAT PT_BEY None of
DBMS_OUTPUT.PUT_LINE (l_numbers (100)); TOO_MANY_ A_FOUN OND_CO the listed
END; ROWS D UNT options
REPLACE TBL_EMP E sal_diff
TRIGGER LOYEES NUMBER;
salary_chang FOR BEGIN
es BEFORE EACH sal_diff
DELETE OR ROW :=
INSERT OR DECLAR :NEW.sal
UPDATE ON E sal_diff ary -
TBL_EMPLO NUMBER; :OLD.sala
YEES FOR BEGIN ry;
EACH ROW DBMS_O DBMS_O
DECLARE UTPUT.P UTPUT.P
sal_diff UT(:OLD.f UT(:OLD.f
NUMBER; irstname||' irstname||'
BEGIN ,'||:OLD.la ,'||:OLD.la
sal_diff := stname|| ': stname|| ':
:NEW.salary - '); ');
:OLD.salary; DBMS_O DBMS_O
DBMS_OUTP UTPUT.P UTPUT.P
UT.PUT(:OLD UT('Old UT('Old
.firstname||','|| salary = ' salary = '
:OLD.lastnam || ||
e|| ': '); :OLD.sala :OLD.sala
DBMS_OUTP ry || ', '); ry || ', ');
UT.PUT('Old DBMS_O DBMS_O
salary = ' || UTPUT.P UTPUT.P
:OLD.salary || UT('New UT('New
', '); salary = ' salary = '
DBMS_OUTP || ||
UT.PUT('New :NEW.sal :NEW.sal
salary = ' || ary || ', '); ary || ', ');
Carefully read the question and answer accordingly. :NEW.salary DBMS_O DBMS_O
Which trigger is used to display the salary change information || ', '); UTPUT.P UTPUT.P
whenever a DELETE , INSERT or UPDATE statement affects DBMS_OUTP UT_LINE( UT_LINE(
the tbl_employees table(Salary Column)- The trigger should be UT.PUT_LIN 'Differenc 'Differenc
FOR EACH ROW trigger. E('Difference: e: ' || e: ' ||
SAMPLE OUTPUT : Fahan,Karn: Old salary = 3500, New ' || sal_diff); sal_diff); sal_diff);
salary = 4500, Difference: 1000 END; END; END;

Applicatio Network
Carefully read the question and answer accordingly. Execution n bandwidth
Select the key advantages of using Store procedures in plan retention modulariz conservati Improved
database management system. and reuse ation on security
VARCHAR2( FROM firstname,
10); TBL_stud lastname
v_lastname ents FROM
VARCHAR2( WHERE TBL_stud
10); studentid ents
CURSOR = WHERE
c_student_na p_student studentid
me IS id; BEGIN =
SELECT OPEN p_student
firstname, c_student id; BEGIN
lastname _name; OPEN
FROM LOOP c_student
TBL_students FETCH _name;
WHERE c_student LOOP
studentid = _name FETCH
p_studentid; INTO c_student
BEGIN OPEN v_firstna _name
c_student_na me,v_last INTO
me; LOOP name; v_firstna
FETCH EXIT me; EXIT
c_student_na WHEN WHEN
me INTO c_student c_student
v_firstname,v _name _name
_lastname; %NOTFO %NOTFO
EXIT WHEN UND; UND;
Carefully read the question and answer accordingly. c_student_na DBMS_O DBMS_O
In the Student Management system we have a table called me UTPUT.P UTPUT.P
STUDENTS with attributes STUDENID ,FIRSTNAME , %NOTFOUN UT_LINE( UT_LINE(
LASTNAME. D; v_firstna v_firstna
TABLE DATA: DBMS_OUTP me||','|| me||','||
STUDENTID FIRSTNAME LASTNAME UT.PUT_LIN v_lastnam v_lastnam
10001 Francis Peter E(v_firstname e); END e); END
10002 Venkat Prasad ','v_lastname) LOOP; LOOP;
Which PLSQL block in the options concatenates both the ; END LOOP; CLOSE CLOSE
Firstname and Lastname with ',' symbol. NOTE : STUDENTID CLOSE c_student c_student None of
should be passed as parameter. c_student_na _name; _name; the listed
SAMPLE OUTOUT : Francis,Peter me; END; END; END; options

SELECT
SELECT ABS("- SELECT
SELECT ABS(-80), 80") ABS('-80')
Carefully read the question and answer accordingly. ABS(-80) Absolute Absolute Absolute
Which of the following SQL statements will calculate and return "Absolute" FROM FROM FROM
the absolute value of -80? FROM DUAL DUAL DUAL DUAL

Carefully read the question and answer accordingly.


XYZ company database has Customer personal information
View table using which customer can update their personal
information like address, phone number fields when user Implemen
updates address and phone number fields in view table. We t using
need to take care of updating address and phone number Stored Implemen Implemen
fields in underlying database base table automatically. What Implement Procedur t using t using
right solution do you suggest to implement this requirement? using Cursors es functions triggers
DECLARE CURSOR %type; customer
c_id c_custom c_addr s.address
customers.id ers is customer %type;
%type; SELECT s.address CURSOR
c_name id, name, %type; c_custom
customers.na address CURSOR ers is
me%type; FROM c_custom SELECT
c_addr customer ers is id, name,
customers.ad s; BEGIN SELECT address
dress%type; OPEN id, name, FROM
BEGIN c_custom address customer
CURSOR ers; FROM s; BEGIN
c_customers LOOP customer LOOP
is SELECT id, FETCH s; BEGIN FETCH
name, c_custom OPEN c_custom
address ers into c_custom ers into
FROM c_id, ers; c_id,
customers; c_name, LOOP c_name,
OPEN c_addr; FETCH c_addr;
c_customers; dbms_out c_custom dbms_out
LOOP put.put_li ers into put.put_li
FETCH ne(c_id || ' c_id, ne(c_id || '
c_customers ' || c_name, ' ||
into c_id, c_name || c_addr; c_name ||
c_name, ' ' || dbms_out ' ' ||
c_addr; c_addr); put.put_li c_addr);
dbms_output. EXIT ne(c_id || ' EXIT
put_line(c_id WHEN ' || WHEN
|| ' ' || c_name c_custom c_name || c_custom
Carefully read the question and answer accordingly. || ' ' || c_addr); ers ' ' || ers
We have customer table with the following values EXIT WHEN %notfoun c_addr); %notfoun
ID NAME AGE ADDRESS SALARY c_customers d; END END d; END
1 Ramesh 26 Delhi 25000 %notfound; LOOP; LOOP; LOOP;
2 Khilan 22 Chennai 30000 END LOOP; CLOSE CLOSE CLOSE
What will be the code to execute all the 3 records from the CLOSE c_custom c_custom c_custom
customer and to print the name and address in a single line. c_customers; ers; END; ers; END; ers; END;
For example : Ramesh Delhi END; / / / /
The
DESCRIB
E Dept
statement
displays
the
structure
of the
Dept table
The only if
The Describe there is a
Rollback Dept COMMITs
statement statement tatement
Carefully read the question and answer accordingly. The Describe frees the returns an introduce
Consider the following SQL statements: statement storage error d before
CREATE Table dept (deptno number (2), deptname varchar displays the space ORA- the
(20), loc varchar (20)); structure of occupied 04043: ROLLBA
ROLLBACK the by the object CK
DESCRIBE dept Department Dept Dept does statement
Which of the following statement is true about the above? table. table. not exist. .
DATE ); TimeTypr TimeTypr artments
TYPE ec IS ec, dept %ROWTY
Meetingmode RECORD TBL_dep PE, place
IS RECORD ( ( minutes artments VARCHA
day DATE, DATE, %ROWTY R2(20),
time_of hours PE, place purpose
TimeTyprec, DATE ); VARCHA VARCHA
dept TYPE R2(20), R2(50) );
TBL_departm Meetingm purpose TYPE
ents ode IS VARCHA ToMeet
%ROWTYPE, RECORD R2(50) ); IS
place ( day TYPE RECORD
VARCHAR2( DATE, ToMeet ( day
20), purpose time_of IS DATE,
VARCHAR2( TimeTypr RECORD time_of
50) ); TYPE ec, dept ( day DATE,
ToMeet IS TBL_dep DATE, dept
RECORD artments time_of TBL_dep
( day DATE, %ROWTY TimeTypr artments
time_of PE, place ec, dept %ROWTY
DATE, dept VARCHA TBL_dep PE, place
TBL_departm R2(20), artments VARCHA
ents purpose %ROWTY R2(20),
%ROWTYPE, VARCHA PE, time purpose
place R2(50) ); SMALLIN VARCHA
VARCHAR2( meeting T); R2(50) );
20), purpose Meetingm meeting meeting
VARCHAR2( ode; Meetingm Meetingm
50) ); meeting seminar ode; ode;
Meetingmode Meetingm seminar seminar
; seminar ode; ToMeet; ToMeet;
ToMeet; BEGIN BEGIN BEGIN
BEGIN seminar.ti seminar.ti seminar.ti
seminar.time_ me_of := me_of := me_of :=
of := meeting.ti meeting.ti meeting.ti
Carefully read the question and answer accordingly. meeting.time me_of; me_of; me_of;
Which is the valid code to declare the nested records _of; END; END; END; END;

Use Use
Aggregat Aggregat
Use e function e function
Carefully read the question and answer accordingly. Aggregate along with along with
XYZ company database has SALES table which captures all function along WHERE ORDER
department sales information. You have been asked to create with GROUP clause in BY clause
department wise summarized total sales report from SALES BY clause in query to in query None of
table. Which of the following correct option will fetch you query to retrieve to retrieve the listed
meaning full result? retrieve result result result options
CURSOR c1 DESC; yees
is SELECT v_employ ORDER
employeeid, eeid BY salary
firstname||','|| NUMBER; DESC;
lastname v_name v_employ
"Name" , VARCHA eeid
salary FROM R2(30); NUMBER;
tbl_employee v_salary v_name
s ORDER BY NUMBER; VARCHA
salary DESC; BEGIN R2(30);
v_employeeid OPEN c1; v_salary
NUMBER; FOR i IN NUMBER;
v_name 1..4 BEGIN
VARCHAR2( LOOP OPEN c1;
30); v_salary FETCH FETCH
NUMBER; c1 INTO c1 INTO
BEGIN OPEN v_employ v_employ
c1; FOR i IN eeid, eeid,
1..3 LOOP v_name, v_name,
FETCH c1 v_salary; v_salary;
INTO INSERT INSERT
v_employeeid INTO INTO
, v_name, temp temp
v_salary; VALUES VALUES
INSERT (v_emplo (v_emplo
INTO temp yeeid, yeeid,
Carefully read the question and answer accordingly. VALUES v_name, v_name,
Which anonymous block to select first 3 highest paid salary (v_employeei v_salary); v_salary);
and to insert into a temp table without any duplicate entry. d, v_name, EXIT EXIT
TABLE DATA : TBL_EMPLOYEES v_salary); WHEN WHEN
EmployeeID Salary DepartmentID EXIT WHEN c1%NOT c1%NOT
258963 3000 20 c1%NOTFOU FOUND; FOUND;
257896 6000 30 ND; COMMIT; COMMIT;
457892 3000 40 COMMIT; END END
564232 3000 40 END LOOP; LOOP; LOOP; None of
254589 8000 50 CLOSE c1; CLOSE CLOSE the listed
784555 5000 20 END; c1; END; c1; END; options

Carefully read the question and answer accordingly.


Consider you are maintaining XYZ company database. XYZ
database tables are accessed by several users to fetch daily
reports by joining multiple tables found each user writes query
which is more than 100 line of SQL statement and submits to
server for processing in order to fetch results. This is really Create
increasing the network traffic and also response time. What will Stored
the right solution you will implement in such scenarios in order Procedur Create Create
to increase performance? Create View e index Trigger

Carefully read the question and answer accordingly.


The below trigger is a Statement Level Trigger? State True or
False?
CREATE or REPLACE TRIGGER After_Update_product
AFTER
insert On product
FOR EACH ROW
BEGIN
INSERT INTO product_check Values('After update, Row
level',sysdate);
END; TRUE FALSE
Carefully read the question and answer accordingly.
Does the below code assign NULL to a nested table?
DECLARE
TYPE Clientele IS TABLE OF VARCHAR2(64);
group1 Clientele := Clientele('Customer 1','Customer 2');
group2 Clientele;
BEGIN
group1 := group2;
END; TRUE FALSE

Carefully read the question and answer accordingly.


Does the below code compares 2 collections?
DECLARE
TYPE Clientele IS TABLE OF VARCHAR2(64);
group1 Clientele := Clientele('Customer 1', 'Customer 2');
group2 Clientele := Clientele('Customer 1', 'Customer 3');
BEGIN
IF group1 = group2 THEN
...
END IF;
END; TRUE FALSE

Carefully read the question and answer accordingly.


The below code checks whether the colletion is NULL and
prints NULL, state TRUE or FALSE?
DECLARE
TYPE emp_rec is RECORD (
firstname TBL_employees.firstname%TYPE,
lastname TBL_employees.lastname%TYPE
);
TYPE professor IS TABLE OF emp_rec;
members professor;
BEGIN

IF members IS NULL THEN


DBMS_OUTPUT.PUT_LINE('NULL');
ELSE
DBMS_OUTPUT.PUT_LINE('Not NULL');
END IF;
END;
/ TRUE FALSE

DECLAR
Ex
VARCHA
DECLARE x R2 (5); BEGIN
VARCHAR2 BEGIN SELECT
(5); BEGIN SELECT pkg_var.d
SELECT dummy_v ummy_va
pkg_var.dum ar INTO x r INTO x
Carefully read the question and answer accordingly. my_var INTO FROM FROM
How to reference the below Packaged variables outside of x FROM DUAL; DUAL;
PLSQL? DUAL; DBMS_O DBMS_O
CREATE OR REPLACE PACKAGE pkg_var AS DBMS_OUTP UTPUT.p UTPUT.p None of
dummy_var CONSTANT VARCHAR2 (5) := 'xyz'; UT.put_line ut_line ut_line the listed
END pkg_var; (x); END; (x); END; (x); END; options
Carefully read the question and answer accordingly.
A Service locator is best implemented as a singleton TRUE FALSE
Carefully read the question and answer accordingly.
Which design pattern used in creating connections using Java Factory Abstract
Database Connectivity (JDBC) API Proxy pattern Pattern Iterator Factory
Carefully read the question and answer accordingly.
The template pattern avoids code duplication by defining
common algorithm in base class and let the subclasses to
implement the variations in the algorithm TRUE FALSE

Carefully read the question and answer accordingly.


A developer designs a web application that must support
multiple user interfaces such as
1. XML based web services for Business to Business clients
2. HTML for web based clients Model - Chain of
3. WML for wireless clients View - Responsi Bridge
Which design pattern provides the solution for this requirement. DAO Controller bility Pattern

Carefully read the question and answer accordingly.


In the below code, if we declare List interface instead of
ArrayList, it would be easier to change any List implementation
to store customer details in future. By defining ArrayList here
the programmer tightly couples the ArrayList in his application.
class CustomerList {
ArrayList customerList;
public CustomerList(ArrayList list){
customerList=list;
}
} TRUE FALSE

Carefully read the question and answer accordingly.


As a developer, you are defining the logging service in the
application. There should be only one instance of logging
service should be defined so that multiple sources in your
application can register and use it. The logging service should
be accessible by all sources of application and hence you need
to provide global point of access to the service. Identify the Abstract
pattern used for this scenario. singleton Factory Factory MVC

Carefully read the question and answer accordingly.


You are developing a web application and based on the client
requests, your application has to share huge data files with
respective clients. To save the network bandwidth, the files
have to be compressed before sending the response. The logic
for compressing the data files should not be redundant though
compression has to applied for all the responses. Which design Model -
pattern should be used in this scenario to avoid the duplication Intercepting View - Transfer
of the compression code? Filter DAO Controller Object
Carefully read the question and answer accordingly.
The Java Remote Method Invocation (RMI) system allows an
object running in one JVM(Client) to invoke methods on an
object running in another JVM(Server). The RMI Client creates
the local representation of the remote object running in the Decorator Composit Adapter
server. Which design pattern implemented in this scenario. Proxy pattern Pattern e Pattern Pattern
Carefully read the question and answer accordingly. Non of
Which are the pattern types are used for building loosely Creational Structural Behaviora the
coupled systems pattern Pattern l Pattern options

It
increases It
It reduces the increases
network traffic complexit the
by combining y of the network
multiple calls remote performan
into one interface Minimizes ce by
network call and the introducin
and fetch and access by latency g multiple
return removing and fine
multiple coarse server grained
Carefully read the question and answer accordingly. values in one grained resource remote
Select the benefit of using Transfer Object design pattern trip methods usage requests

Carefully read the question and answer accordingly.


We are developing a system that performs approval of various
purchasing requests. The approval authority can be a
purchase lead or purchase manager or purchase head based Chain of
on the cost of the purchase. The system should be flexible to Responsi Template
select the approver based on the cost of the purchase. Which Bridge bility Method MVC
design pattern should be used to handle this situation. pattern pattern Pattern Pattern

Carefully read the question and answer accordingly.


Observe the below code snippet.
public interface iPersistence{
public Object save(Object o);
public Object findBy(Object key);
}
public class PersistenceImp implements iPersistence{
public Object save(Object o){
....
}
public Object findBy(Object key){
....
}
}
As per the requirement, the iPersistence interface might be
added with few more methods in future. This leads to the
change of code in PersistenceImp class as well to provide
implementation for new abstract methods introduced. Which
pattern should be used in this scenario so that any change in
the interface will not result in a change in PersistenceImp Bridge Decorator Proxy Template
class. pattern Pattern Pattern Pattern
Software Cohesion
coupling is clear
defined separatio
as the n of
degree to related
Cohesion is which a functionali
the OO software ty into
Concept module distinct
which hides relies or modules, Cohesion
the depends Compone maximize
Carefully read the question and answer accordingly. implementatio on other nts , or s code
Which are the statements are true n modules. classes. reusability

Carefully read the question and answer accordingly.


Consider that we are connecting to different data sources from
our application. If we couple the persistence code along with
business logic, then the change of data source in the
application will affect the business logic. Which design pattern
is recommended to handle this scenario to ensure that the Factory Service
change in data source would not affect the business logic. . DAO Pattern Pattern Façade Locator

the
implemen
tation
code for
Singleton
pattern :
public
class
PrinterSin
gleton
{ public
PrinterSin
gleton
instance =
To null;
implemen private
t singleton PrinterSin
pattern, gleton ()
we create { } public
static PrinterSin
reference gleton
to the getInstan
singleton ce()
instance { if(instan
and return ce ==
a null)
reference { instance
Singleton Provides to that = new
pattern global instance PrinterSin
ensures that access to from a gleton (); }
only one the static return
Carefully read the question and answer accordingly. object for the Singleton instance() instance;
Select the options which are true for Singleton pattern class created Object method } }
Carefully read the question and answer accordingly.
A good designed application should have " tight coupling and
low cohesion" TRUE FALSE
AnswerD
Choice5 Grade1 Grade2 Grade3 Grade4 Grade5 escription QuestionMAnswerMedAuthor

1&4 0 0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1&4 0 0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
A firewall
server will
add
security
tokens to
the
requests
before
passing to
destinatio
n server 0 0 0.5 0.5 0 TEXT TEXT

1 0 TEXT TEXT

0 1 TEXT TEXT

0 0 0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0.5 0 0.5 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT
0 0 0 1 TEXT TEXT

0.33 0.33 0.33 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT
0 1 0 0 TEXT TEXT

None of
the above 0 1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

3&4 0 0 1 0 0 TEXT TEXT

0 1 TEXT TEXT
0.33 0.33 0.33 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0 0 1 0 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1&5 0 0 0 1 0 TEXT TEXT

1&4 0 0 0 0 1 TEXT TEXT

0 0 0 1 TEXT TEXT
1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT
0 0 0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

1&5 1 0 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

2&3&4 0 1 0 0 0 TEXT TEXT

1&4 0 1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

3&4&5 0 0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
<jsp:useB
ean
id="accou
nt"
type="co
m.cts.Acc
ount"
scope="s
ession">
<jsp:getPr
operty
name="ac
count"
property="
accountN
umber" />
</jsp:use
Bean> 0 0 0 1 0 TEXT TEXT

None of
the given
option 0 0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
1&5 0 0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 TEXT TEXT
1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

private,ab
stract 0 1 0 0 0 TEXT TEXT

0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

Class 0 0 0 1 0 TEXT TEXT


1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

Variable 0 0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

2&4 0 0 0 0 1 TEXT TEXT

0 1 TEXT TEXT
0 1 0 0 TEXT TEXT

0 1 TEXT TEXT

0 0 1 0 TEXT TEXT
0 0 1 0 TEXT TEXT

0 1 TEXT TEXT

1 0 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 TEXT TEXT

2&4 0 0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 TEXT TEXT

1 0 TEXT TEXT

2&4 0 0 0 0 1 TEXT TEXT


0 1 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 TEXT TEXT
1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 0 1 0 TEXT TEXT

0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 TEXT TEXT
1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

Object 0 1 0 0 0 TEXT TEXT

Boolean 0 0 1 0 0 TEXT TEXT

exception 0 0 0 0.5 0.5 TEXT TEXT

0 1 TEXT TEXT

0 1 0 0 TEXT TEXT
0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 0 0 0 1 TEXT TEXT
No Output 0 0 0 0 1 TEXT TEXT

None of
the
options. 0 0 0 0 1 TEXT TEXT

0 0 0 1 TEXT TEXT

Synchroni
zed
interfaces 0.5 0.5 0 0 0 TEXT TEXT
1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

2&4 0 0 0 1 0 TEXT TEXT


0 0 0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0.5 0 0 0.5 TEXT TEXT

0 1 TEXT TEXT

0 1 TEXT TEXT

1 0 TEXT TEXT

0 1 TEXT TEXT
0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 0.5 0.5 TEXT TEXT

0 0 1 0 TEXT TEXT

E 0 0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 TEXT TEXT
2&4 0 0 0 0 1 TEXT TEXT

0 0 0 1 TEXT TEXT

0 1 TEXT TEXT

1 0 TEXT TEXT

1 0 TEXT TEXT

0 1 TEXT TEXT

0 0 0.5 0.5 TEXT TEXT

1 0 TEXT TEXT

1 0 TEXT TEXT

0 1 TEXT TEXT

0 1 TEXT TEXT
0 0 1 0 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 0.5 0.5 TEXT TEXT

0 0.5 0 0.5 TEXT TEXT

1 0 TEXT TEXT

0 0 1 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0 0 0.5 0.5 TEXT TEXT

0.33 0 0.33 0.33 TEXT TEXT

0.33 0.33 0.33 0 TEXT TEXT

2&4 0 1 0 0 0 TEXT TEXT


0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 TEXT TEXT

1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 TEXT TEXT

0 1 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT
0 0 1 0 TEXT TEXT

0.33 0.33 0 0.33 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 TEXT TEXT

2&4 1 0 0 0 0 TEXT TEXT


0.33 0 0.33 0.33 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0.33 0.33 0 0.33 TEXT TEXT


0 1 0 0 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT


2&3 1 0 0 0 0 TEXT TEXT

0 0 0.5 0.5 TEXT TEXT


2&4 0 0 1 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 0 0 1 TEXT TEXT
0 0 0 1 TEXT TEXT

1 0 TEXT TEXT

0 1 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0.5 0 0 0.5 TEXT TEXT

1 0 TEXT TEXT
0 0 1 0 TEXT TEXT

0 1 TEXT TEXT

0.5 0 0.5 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

2&4 0 0 0 0 1 TEXT TEXT

0 1 TEXT TEXT
1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
0.33 0.33 0.33 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 TEXT TEXT

0 0.5 0.5 0 TEXT TEXT

0 0 1 0 TEXT TEXT

2&4 0 0 1 0 0 TEXT TEXT

1 0 TEXT TEXT
0 1 TEXT TEXT

1 0 TEXT TEXT

0 1 TEXT TEXT

0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0.33 0.33 0.33 TEXT TEXT

escape 1 0 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

branch 1 0 0 0 0 TEXT TEXT

for..each 0 0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
64 0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

The
program
generates
a
compilatio
n error. 0 1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 0 0 1 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

None Of
the
options 1 0 0 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

none 0 1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

2&4 0 0 1 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
0 0 0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

2&4 1 0 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

344350 0 1 0 0 0 TEXT TEXT

date
functions
cannot be
converted
into char 0 1 0 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

20 1 0 0 0 0 TEXT TEXT

Prints 14 0 1 0 0 0 TEXT TEXT

None of
the listed
options 0 0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
Create
sequence
MySeq as
Start with
2
Increment
by 2 0 0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

It would
remain
disabled
and has
to be
enabled
manually
using the
ALTER
Constraint
command
. 0 0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0 0 1 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

All of the
listed
options 0 0 0 0 1 TEXT TEXT

Incorrect
syntax to
create a
synonym 0 0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 TEXT TEXT

Cannot
drop
tables
from
Recycle
Bin 1 0 0 0 0 TEXT TEXT
0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

You can
join "n"
tables(all
having
single
column
primary
keys)in a
SQL
statement
by
specifying
a
minimum
of "n-1"
join
conditions
. 0 0 0 0 1 TEXT TEXT

Select
count(*)
from emp
where sal
in (select
avg(sal)
from
emp); 0 1 0 0 0 TEXT TEXT
select
empNam
e,
empNo
from emp
where
empno
between (
select
deptNo
from dept) 0 0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

You want
all
matched
and
unmatche
d data
from only
one table. 0 0 0 1 0 TEXT TEXT

Inner Join 0 0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT
2&4 1 0 0 0 0 TEXT TEXT

2&4 0 0 0 0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT


0 0.5 0.5 0 TEXT TEXT

0.33 0.33 0.33 0 TEXT TEXT

0.33 0.33 0 0.33 TEXT TEXT

1 0 TEXT TEXT
1 0 0 0 TEXT TEXT

0 1 TEXT TEXT

Compiles
and runs
without
any
output 0 0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 TEXT TEXT

1&3&5 0 0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

0.5 0 0 0.5 TEXT TEXT

0.33 0.33 0.33 0 TEXT TEXT


Compilati
on fails
due to
error on
line 1 0 0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

0.5 0 0.5 0 TEXT TEXT

0.5 0 0.5 0 TEXT TEXT

0 1 0 0 TEXT TEXT

None of
the listed
options 1 0 0 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

Compiles
executes
and prints
11 12 13
More 0 0 1 0 0 TEXT TEXT
0.33 0.33 0 0.33 TEXT TEXT

0.5 0 0.5 0 TEXT TEXT

1 0 TEXT TEXT

0.5 0 0 0.5 TEXT TEXT


0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0.5 0 0 0.5 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT


0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0.25 0.25 0.25 0.25 TEXT TEXT

1 0 TEXT TEXT

0.25 0.25 0.25 0.25 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 0 1 TEXT TEXT
None of
the listed
options 0 1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT
1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 TEXT TEXT

FOR
EACH
ROW
statement
-level
trigger on
the EMP
table. 1 0 0 0 0 TEXT TEXT

4&5 0 0 0 0 1 TEXT TEXT

2&4 0 0 0 1 0 TEXT TEXT

1 0 TEXT TEXT
dbms_out
put.put_li
ne(secon
d_rec.nes
ted_rec.fir
st_rec.var
1); 0 0 0 1 0 TEXT TEXT
None of
the listed
options 1 0 0 0 0 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0.33 0.33 0.33 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 0 1 0 TEXT TEXT

0.33 0.33 0.33 0 TEXT TEXT

No output
is
displayed. 0 0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT


0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0.33 0.33 0.33 0 TEXT TEXT

0 1 0 0 TEXT TEXT
Replacing
RAISE_A
PPLICATI
ON_ERR
OR(-
20000,
'no
negative
age
allowed');
to
RAISE_A
PPLICATI
ON_ERR
OR(-
20000,”no
negative
age
allowed”);
will give
the
desired
output 0 0 1 0 0 TEXT TEXT

0 1 TEXT TEXT
Define ,
Open ,
Fetch ,
Close 0 1 0 0 0 TEXT TEXT

0.33 0 0.33 0.33 TEXT TEXT


0.5 0.5 0 0 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT


1 0 0 0 TEXT TEXT
None of
the listed
options as
procedure
s cannot
be
created
for select
statement 1 0 0 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT


Compiles
successfu
lly and
terminate
s the
program
due to an
Exception 0 0 0 1 0 TEXT TEXT

0 1 TEXT TEXT
0 0 0 1 TEXT TEXT

1&3&5 0 0 0 1 0 TEXT TEXT

0 0 0 1 TEXT TEXT
0 0.5 0 0.5 TEXT TEXT

Compiles
, executes
prints 3
Delhi
Delhi 0 1 0 0 0 TEXT TEXT

1&3&5 0 0 0 0 1 TEXT TEXT

Compiles
, executes
and prints
12345
67 0 0 0 1 0 TEXT TEXT
Compiles
, executes
and prints
2, ,3 ,4, 5,
6, 7 0 0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0.5 0.5 0 0 TEXT TEXT

Compiles
fine and
prints the
output as
1 0 0 0 1 0 TEXT TEXT

Compiles
and runs
without
any
output 0 0 1 0 0 TEXT TEXT
0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 TEXT TEXT

1&3 0 0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

1&3 0 0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 0 0 1 TEXT TEXT
1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT
0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT

1&3 0 1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

1&3 0 0 1 0 0 TEXT TEXT


0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT

0 0 0 1 TEXT TEXT

0 0 1 0 TEXT TEXT

1&3 0 0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 1 0 TEXT TEXT
0 0 0 1 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0.5 0 0.5 TEXT TEXT


0 0 1 0 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 0 1 TEXT TEXT

1 0 TEXT TEXT

0 0 1 0 TEXT TEXT
1 0 TEXT TEXT

All of the
listed
options 0 0 0 0 1 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 TEXT TEXT
0 0 1 0 TEXT TEXT

1 0 TEXT TEXT
0 1 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT
0 1 0 0 TEXT TEXT

All of the
listed
options 0 0 0 0 1 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0 0 1 0 TEXT TEXT

0 0 0 1 TEXT TEXT
1 0 TEXT TEXT

None of
the listed
options 1 0 0 0 0 TEXT TEXT

0 0 1 0 TEXT TEXT
1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
0 0 1 0 TEXT TEXT
1 0 0 0 TEXT TEXT
0 0 1 0 TEXT TEXT
0 0 1 0 TEXT TEXT

0 1 0 0 TEXT TEXT
1 0 0 TEXT TEXT

All of the
listed
options 0 0 0 0 1 TEXT TEXT
0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT

0 0 0 1 TEXT TEXT
0 1 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT
0 0.5 0.5 0 TEXT TEXT

1 0 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

0 1 0 0 TEXT TEXT

0 1 TEXT TEXT
1 0 TEXT TEXT

0 1 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT
1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 TEXT TEXT

1 0 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
1 0 0 0 TEXT TEXT

0 0.5 0.5 0 TEXT TEXT

0.5 0 0.5 0 TEXT TEXT

0 1 0 0 TEXT TEXT

1 0 0 0 TEXT TEXT
Cohesion
is the OO
principle
most
closely
associate
d with
allowing
an object
to have
many
types 0 0.33 0.33 0.33 0 TEXT TEXT

1 0 0 0 TEXT TEXT

Applicatio
nContext
is the
example
of
Singleton
Pattern 0.25 0.25 0.25 0 0.25 TEXT TEXT
0 1 TEXT TEXT
Reviewer Is Numeric
Servlets 2 69 68 12-Apr 184-250
128 135 8 13-Apr 251-320 69
174 177 4
181 183 3
JSP 70 127 58
136 173 38
178 180 3
Core Java 184 412 229
PL/SQL 416 552 137
HTML 553 570 18
JavaScript 571 579 9
xml 580 602 23
Industry Practices 603 618 16
Core Java Scenarios 619 679 61
J2EE Design Patterns 680 695 16
691

You might also like