Struts2 Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to Struts2 Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - Which of the following is a contextual keyword in C#?

A - get

B - set

C - add

D - All of the above.

Answer : D

Explanation

All of the above options are contextual keywords.

Q 2 - Value type variables in C# are derived from the class System.ValueType?

A - true

B - false

Answer : A

Explanation

Value type variables in C# are derived from the class System.ValueType.

Q 3 - Which of the following converts a type to a 32-bit integer in C#?

A - ToDecimal

B - ToDouble

C - ToInt16

D - ToInt32

Answer : D

Explanation

ToInt32() method converts a type to a 32-bit integer.

Q 4 - Which of the following converts a type to an unsigned long type in C#?

A - ToType

B - ToUInt16

C - ToUInt32

D - ToString

Answer : C

Explanation

ToUInt32() method converts a type to an unsigned long type.

Q 5 - Which of the following access specifier in C# allows a child class to access the member variables and member functions of its base class?

A - Public

B - Private

C - Protected

D - Internal

Answer : C

Explanation

Protected access specifier allows a child class to access the member variables and member functions of its base class.

Q 6 - Which of the following property of Array class in C# checks whether the Array has a fixed size?

A - IsFixedSize

B - IsStatic

C - Length

D - None of the above.

Answer : A

Explanation

IsFixedSize gets a value indicating whether the Array has a fixed size.

Q 8 - Function overloading is a kind of static polymorphism.

A - true

B - false

Answer : A

Explanation

Function overloading is a kind of static polymorphism.

Q 9 - Which of the following preprocessor directive lets you modify the compiler's line number and (optionally) the file name output for errors and warnings in C#?

A - elif

B - endif

C - line

D - region

Answer : C

Explanation

#line − It lets you modify the compiler's line number and (optionally) the file name output for errors and warnings.

Q 10 - Which of the following preprocessor directive allows generating a level one warning from a specific location in your code in C#?

A - warning

B - region

C - line

D - error

Answer : A

Explanation

#warning − It allows generating a level one warning from a specific location in your code.


struts_questions_answers.htm

Advertisements