You are on page 1of 8

WORKSHOP ON OBJECTIVE TYPE QUESTIONS (OTQ’s)

Informatics Practices (265-Old Syllabus)

Date: 16-MAY-2019 Chapter -5 (Advanced Programming Concepts)

Category: Match the following

QNo. Question Correct Answer Type


(Knowledge
based /
Conceptual
Understanding/
Reasoning
Based/Skill
Based)
1. Amit is working with string function in java. Column Column Knowledge
He has been given the list of functions and its uses. Match the A B based
column A with column B. 1) b)
Column A Column B
2) d)
1)this function is used to get a) getLength()
the length of the string. b) length()
2) this function is used to c) upperCase()
convert lower case to upper d) toUpperCase()
case.
2. Amit is working with string function in java. Knowledge
He has been given the list of functions and its uses. Match the based
column A with column B.
Column A Column B
1) this function extracts the a) substr()
substring from given string. b) substring()
c) string()
d) toString() Column Column
2) this function converts the A B
other datatype to string. 1) b)
2) d)
3 Amit is learning numeric functions in java. Knowledge
He executes a set of numeric functions. Match the column A based
with column B. Column Column
Column A Column B A B
1) Math.pow(2,0) a) 0 1) b)
2) Math.pow(2,-1) b) 1 2) c)
c) 0.5
d) 2
4 Ashok is learning concept of class in JAVA. Knowledge
Match the column A with column B. based
Column A Column B Column Column
1) It encapsulates the data a) Native class A B
members and member b) Class 1) b)
functions. c) Variable 2) d)
2) It is an instance of a class. d) Object
5 Ashok is learning concept of functions in JAVA. Knowledge
Match the column A with column B. based
Column A Column B Column Column
1) Math a) Native class A B
2) length() b) Class 1) a)
c) method 2) c)
d) Object
6 Ojaswini is working on library functions of JAVA where she has Knowledge
been given the output of certain java statements. Help Ojaswini based
to get the equal JAVA statements from column B. Column Column
Match the column A with column B. A B
Column A Column B 1) a)
1) ABC@GMAIL.COM a) 2) c)
“abc@gmail.com”.toUppperCase()
2) pqr b) “abc@gmail.com”.ucase()
c) “pqrst”.substring(0,3)
d) “pqrst”.substring(1,3)
7 Prachi is learning concept of functions in JAVA. Knowledge
Match the column A with column B. based
Column A Column B Column Column
1) The string representation of the a) charAt() A B
object b) toString() 1) b)
c) length() 2) c)
2) returns the no. of characters
d) char()
8 Match the column A with column B. Knowledge
Column A Column B based
1) Round off the decimal no. a) Math.pow() Column Column
to the nearest value. b) Math.abs() A B
2) first argument raise to the c) Math.round() 1) c)
power of second argument d) Math.random() 2) a)

9 Match the column A with column B. Knowledge


Column A Column B based
1) Returns 3 raise to power 2. a) Math.pow(3,2) Column Column
2) Returns the closest integer b) Math.round(double a) A B
to the float argument. c) Math.round(float a) 1) a)
d) Math.pow(2,3) 2) c)
10 Match the column A with column B. Column Column Knowledge
Column A Column B A B based
1) String a) Returns the closest int to the double argument. 1) d)
2) Object. b) Returns the closest in to the float argument. 2) c)
c) an instance of a class.
d) is a sequence of characters
1 Column A has examples of operators of Java and Column B has 1. b,d Knowledge
the name of the type of operators. Match the operator in Column 2. c
A with type of operator in Column B (an option in Column B
may be used more than once)
Column A Column B
1.< a.Logical Operator
2.= b.Relational Operator
c. Assignment Operator
d. Comparison operator

2. Column A has expressions in Java and Column B has their 1. b Conceptual


respective values. Match the Column A with Column B (an 2. a
option in Column B may be used more than once)
Column A Column B
1.5/6 a.5
2.5%6 b.0
c.6
d.1

3. Column A has method names in Java and Column B has their 1. c Knowledge
Swing controls. Match the Column A with Column B (an option 2. a
in Column B may be used more than once)
Column A Column B
1.getSelectedItem() a. List box
2.getSelectedValue() b. Text Area
c. Combo box
d. Text Field

4. Column A has methods and properties in Java and Column B 1. b,c Knowledge
has their respective categories/controls. Match the Column A 2. a,d
with Column B (an option in Column B may be used more than
once)
Column A Column B
1.getText() a.Property
2.model b.Text Field
c.Method
d.List box

5. Column A has types of selection of items in Java and Column B 1. b,d Knowledge
has their respective controls. Match the Column A with Column 2. a,c
B (an option in Column B may be used more than once)
Column A Column B
1.Single a.Check box
2.Multiple b.Radio Button
c.List box
d.Combo Box

6. Column A has categories of statements in Java and Column B 1. b,c Knowledge


has names of statements. Match the Column A with Column B 2. a,d
(an option in Column B may be used more than once)
Column A Column B
1.Selection a.for
2.Iterative b.if else
c. switch
d. do…while

7. Column A has various terms used in Java and Column B has 1. a Knowledge
respective expansions. Match the Column A with Column B (an 2. c
option in Column B may be used more than once)
Column A Column B
1.IDE a.Integrated Development Environment
2.RAD b.Integrated Design Environment
c.Rapid Application Development
d.Rapid Application Design

8. Column A has categories of operators in Java and Column B has 1. a,c Knowledge
symbols of operators. Match the Column A with Column B (an 2. b,d
option in Column B may be used more than once)
Column A Column B
1. Unary a. --
2. Binary b. *
c. ++
d. %
9. Column A has classes in Java and Column B has theirrespective 1. a,c Knowledge
methods. Match the Column A with Column B (an option in 2. b,d
Column B may be used more than once)
Column A Column B
1.JOptionPane a.showMessageDialog()
2.Math b.round()
c.showConfirmDialog()
d.pow()

10. Column A has categories of controls in Java and Column B has 1. b,d Knowledge
names of controls. Match the Column A with Column B (an 2. a,c
option in Column B may be used more than once)
Column A Column B
1.Parent Control a.Text Field
2.Child Control b.JFrame
c.List Box
d. JPanel

11. Column A has methods in Java and Column B has their 1. a Knowledge
respective return types. Match the Column A with Column B 2. c
(an option in Column B may be used more than once)
Column A Column B
1.getText() a.String
2.isSelected() b.float
c.boolean
d.int

12. Column A has names of methods in Java and Column B has 1. a,b Knowledge
data types of values that it accepts as parameters. Match the 2. c
Column A with Column B (an option in Column B may be used
more than once)
Column A Column B
1.setSelected() a.true
2.isEnabled() b.false
c.void

13. Column A has Swing controls in Java and Column B has 1. b Knowledge
respective methods to clear controls. Match the Column A with 2. a
Column B (an option in Column B may be used more than once) 3. a
Column A Column B 4. d
1. Check Box a.setText()
2. Text Field b.setSelected()
3. Text Area c.clear()
4. combo box d. setSelectedIndex()

14. Consider the values: a=3, B=4 and c= 7. 1. a Knowledge


Column A has logical expressions in Java and Column B has 2. b
respective values. Match the Column A with Column B (an 3. a
option in Column B may be used more than once)
Column A Column B
1. (a>b)&&(b>c) a.0
2. (a<b)||(b<c) b.1
3. !(a<b)

15. Column A has data types in Java and Column B has number of 1. b Knowledge
bytes it occupies in memory. Match the Column A with Column 2. a
B (an option in Column B may be used more than once) 3. b
Column A Column B 4. d
1.float a.8
2.double b.4
3. int c.2
4. byte d. 1

16. Column A has categories of data types in Java and Column B 1. a,d Knowledge
has names of data types. Match the Column A with Column B 2. b,c
(an option in Column B may be used more than once)
Column A Column B
1.Floating Point a.float
2.Character Type b.char
c. String
d. double

17. Column A has selection statements in Java and Column B has 1. b Knowledge
their respective features. Match the Column A with Column B 2. a, c,d
(an option in Column B may be used more than once)
Column A Column B
1. if a.Can not compare ranges
2. switch b.supports decimal values
c.equality Comparison only
d. can not compare decimals

18. Column A has properties/methods in Java and Column B 1. a Knowledge


hascontrols. Match the Column A with Column B (an option in 2. b,c
Column B may be used more than once) 3. d
Column A Column B 4. b,c
1.text a.Text Field
2.selected b.Radio Button
3. selectedIndex c.Check box
4. isSelected() d. List box

Column A Column B
1. 1. Name the native classes a. java.String 1.b
supported by Java b. Math and String
2. Name the package that c. String and Int 2.d
contain in built methods of d. java.lang
Math class
1. A method which is an a. round() 1.a
example of Method b. pow()
Overloading
2. 2. A method that is used to c. trim() 2.c
remove leading and trailing d. ltrim()
white spaces e. rtrim()

1. A method used to convert a a. toUpper() 1.b


string into uppercase b. toUpperCase()
3.
2. A method used to convert a c. toLower() 2.d
string into lowercase d. toLowerCase()
4. 1. Default arguments data type a. double 1. a
supported by Math.pow() b. int
method.
2. Default arguments data type c. long 2. b
supported by substring() d. float
method
5. 1. Name the class(es) belonging a. String 1. b
to java.lang package b. String and Math
2. Name the class(es) that has c. String and Int 2. a
length() method d. Math
6. 1.In the String “Social a. 8 1. c
Networking” the index of ‘c’ is b. 9

2. In the String “Happy c. 2 2. a


Birthday” the index of ‘t’ is d. 3
7. 1. In the String “White spaces” a.”Whitespaces.substring(5,8) 1.
the output given by a method is
“ sp”. What will be the b. “Happy”.trim()
expression for the method used
2. The output of a method is 5 c.”Whitespaces.substring(5,7) 2.
for the given string “Happy”.
What will be the expression for d. “Happy”.length()
the method used?
8. 1.“application”.toUpper() will a. Application 1. d
result into b. application
2.“application”.toLower() will c. aPPLICATION 2. b
result into d. APPLICATION
9. 1. This method extracts a. subStr() 1. a
specified number of characters b. concat()
from a string
2. This method concatenates the c. SUBSTRING() 2. b
specified string to the end of d. toString()
the string
10. 1. F2 will be concatenated at the a. F1=F1.concat(F2) 1. a
end of F1 and stored in F1 b. F2= F2.concat(F1)
2. F1 will be concatenated at the c. F2=F1.concat(F2) 2. d
end of F2 and stored in F1 d. F1= F2.concat(F1)
11. 1.To trim a string by removing a. Ltrim() 1. c
spaces from both sides b. toString()
2. Which method returns the c. trim() 2. b
objects as a string d. length()
12. 1. String function a. pow() 1. d
b.caps()
2. Math function c. multiply() 2. a
d.toUpperCase()
13. 1. Default argument data type a. double 1. a
supported by Math.pow() b. int
method
2. Default argument data type c. long 2. b
supported by substring() d. float
method
14. 1.Which class(es) belong to a. String 1. b
java.lang package b. Math & String
2. Which class(es) has length() c. String & Int 2. d
method? d. Math
15. 1.length() returns the output in a. True 1. a
string datatype b. False
2. Return type of pow() method c. boolean 2. d
d. double
16. 1. a method used to convert a a. toUpper() 1.b
string into Uppercase b. to UpperCase()
2. a method used to convert a c. tolower() 2. d
string into lowercase d.tolowercase()
17 1.selectedItem property of a. jTextArea 1. b
swing control b.jList
2.echochar property of swing c. jRadioButtton 2. d
control d. jPassword
18 1.Blue print of similar kind of a. Encapsulation 1.d
objects b.Polymorphism
2.It is identifiable entity having c. Objects 2.c
some characteristics and d. Class
behaviour
19. 1.Concatenates the specified a. substring() 1.d
string to the end of the string b. to Concat()
2.Returns a substring of the c. to String() 2.a
characters between the two d. Concat()
specified positions of the string
20 1. A primitive datatype in a. Int 1.a
java b. class
2. Valid method of string c. Concat 3. c
class d. Concatition

You might also like