SlideShare a Scribd company logo
1 of 35
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
1 2 3 .... 10000
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
1. What do we call the basic data type which can store only one value at a time?
a) Local variable
b) Scalar variable
c) Static variable
d) Instance variable
2. What do we call the data type that can be used to store a collection of more than
one data values?
a) Scalar variable
b) Constructor
c) Basic variable
d) Composite variable
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
3. Which kind of variable is a variable representing a collection of homogeneous type
of elements?
a) Array
b) Global
c) Instance
d) Local
4. What is useful when same operations are to be performed on various elements of
the similar type in Java ?
a) String
b) Array
c) If ... Then
d) While
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
5. Arrays are useful to represent which type of data in Java ?
a) Vector
b) Matrix
c) Multi dimensional
d) All of these
6. Which of the following are useful to represent vector, matrix and other multi -
dimensional data ?
a) Variable
b) Element
c) Tag
d) Array
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
7. Java does not support ............. type of an array.
a) 1 D
b) 2 D
c) Multi – dimensional
d) Both b and c
8. ................. is a 1D data structure that can be used to store list of items like
character, numbers in Java.
a) Matrix
b) Vector
c) Composite
d) Static
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
9. .............. is used to represent 2 – D data structure like table of rows and columns.
a) Matrix
b) Vector
c) Composite
d) Static
10. Which type of array is used like table of rows and columns ?
a) Primitive array
b) Minor array
c) 1- D array
d) 2- D array
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
11. How do we identify each element of array?
a) By a pointer
b) By an index position
c) By memory allocation
d) All of these
12. An index position of an array is associated with array ..................
a) Method
b) Function
c) Variable
d) Class
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
13. What specifies the position of an element in an array ?
a) Serial
b) Index
c) Number
d) Class
14. Which of the following refer to the starting index value in arrays?
a) 1
b) 0
c) Null
d) All of these
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
15. What is the process of making an object used to manage list of items in array?
a) Declare an array object
b) Create an array object
c) Both (a) and (b)
d) Define object method
16. An array object can be created in how many ways ?
a) Directly initializing the content of array
b) Specify the size
c) Using new operator and specifying the size
d) Both a and c
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
1 D Array
Single Dimension Array
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
17. Which of the following syntax is used to declare array in java ?
a) <data type>[ ] < array name>[];
b) <data type><array name> [ ];
c) Both (a) and (b)
d) None of these
18. Declaring an array without ......... does not create an array object.
a) Declaration
b) Initialization
c) Instantiation
d) None of these
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
19. In java, initial value of array elements are specified into what brackets ? OR Which
type of braces is used to initialize data elements in 1-D array?
a) ()
b) {}
c) []
d) <>
20. In java, initial value for 1 – D array are separated using which symbol? OR In java,
by using which sign 1-D array is initialized to separate values of data elements in
braces() ?
a) – (dash)
b) : (colon)
c) ,(comma)
d) .(full stop)
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
21. Which of the following an example of data element of array?
a) int marks[ ]={50,60,70};
b) int marks[3]={50,60,70};
c) int marks[ ]=(50,60,70);
d) int marks[ ]={50;60;70};
22. Size of each row can be known using ..... property of 1 – D array.
a) Size
b) Length
c) Width
d) Row
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
23. In java, how can be array elements accessed using index for each dimension in?
a) ()
b) {}
c) []
d) <>
24. If ‘int marks[]={1,2,3,4,5};’ is defined in java what will be the value of marks[3] ?
a) 3
b) 2
c) 4
d) 5
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
25. In java, we can not specify both the size of ....... and ....... values of the array
elements simultaneously while declaring an array.
a) Class & Variable
b) Dimensions & Length
c) Initial & Value
d) Dimensions and Initial
26. Which of the following is not a right statement to declare an array named
marks in java ?
a) int marks[]=new int[3]
b) int marks[3]={50, 60, 70}
c) int[] marks=new int[3]
d) None of these
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
27. How many bytes are used to store the int marks[] = new int [5] array ?
a) 5 X 1 = 5
b) 5 X 2 = 10
c) 5 X 4 = 20
d) 5 X 8 = 40
28. Sort and fill() are methods of which of the following java class? OR We can use
various static methods provided by Java using which array class?
a) java.util.io
b) java.util.Arrays
c) java.io.Arrays
d) java.lang.Arrays
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
29. Which type of method is used to sort entire or part of array in java ?
a) fill()
b) sort()
c) show()
d) search()
30. In java, which method is used to fill the whole or partial array with specified value?
OR Which method of java.util.Arrays class is used to fill the whole or partial array
with specified value ?
a) sort()
b) set()
c) insert()
d) fill()
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
31. If you want to assigns value 7 to all elements of list array then which method is
used?
a) fill (ls,7)
b) fill(list, 7)
c) sort(list, 7)
d) fill(7)
32. What will done with command “fill (list, 2,6, 5);”?
a) Assigns array list value 5 to element list [5] to list [6 – 1]
b) Assigns array list value 6 to element list [2] to list[5 – 1]
c) Assigns array list value 5 to element list [2] to list[6 – 1]
d) None of these
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
33. In java, to search an element in an array, array class provides which type of
method?
a) sort()
b) fill()
c) binarySearch()
d) remove()
34. Which method in java, is used to search element by element comparison in a
serial fashion ?
a) Linear search
b) Find
c) Binary search
d) Look
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
2 D Array
Two Dimensional Arrays
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
35. If we write “int marks [][]=new int [5][3]” then which view shows the elements of
array in a table of 5 rows and 3 columns ?
a) Index view
b) Display view
c) Logical view
d) Physically view
36. In java, which view of array is stored in memory using contiguous memory?
a) Index view
a) Display view
b) Logical view
c) Physically view
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
37. Which braces is used in 2 D array using comma separated values of data elements ?
a) [] (square bracket)
b) () (simple bracket)
c) <> (angled bracket)
d) {} (curly bracket)
38. In the following statement for declaring two dimensional array of java 5 represent
what?
int marks[][]=new int[5][3];
a) Array size
b) Number of columns
c) Number of rows
d) Number of bytes
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
39. What is the size of second dimension in an array sale [5][12] ?
a) 5
b) 10
c) 12
d) 60
40. What is the size of second dimension in an array gseb [5] [3] ?
a) 3
b) 5
c) 15
d) 18
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
41. Which property is used with only array name returns the size of its first
dimension in java?
a) Byte
b) Length
c) Width
d) Size
42. How many integer values will be stored in the following array ?
int marks[][]=new int[4][4];?
a) 4
b) 8
c) 16
d) 644
2.
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
43. What expression sales. length return for an array sales[5][12] ?
a) 5
b) 10
c) 12
d) 60
44. When an array sales[5][12] is declared without specifying initial values, what is
the initial value of sales[0][0] ?
a) 0
b) Default value
c) 60
d) Compilation error
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
45. In statement “int marks [][]=new int [5][3]” occupy how many memory ?
a) 15 (5*3) integers that store 0 bytes
b) 15 (5*3) integers that store 60 (15*4) bytes
c) 15(5*3) integers that store 15 bytes
d) None of these
46. How many bytes of location are occupied by an array ‘b’ of int b[][]=new int[5][3];?
a) 3
b) 5
c) 15
d) 60
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
Strings
Sequence of characters
1-D array of
charactersś
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
47. 1-D array of characters can be considered as a…………….. OR
…….. is considered as a sequence of characters
a) Character
b) String
c) Integer
d) Long
48. In java, string literals, a sequence of characters is enclosed between which sign?
a) ‘ ‘(single quote)
b) “ “(double quotes)
c) <>
d) /*….*/
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
49. Java supports two types of strings that are handled by which of the following class?
a) String
b) StringBuffer
c) character
d) Both (a) and (b)
50. Which operator can be used to concatenate a string in java?
a) =
b) +
c) &
d) *
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
51. In statement “String str1=new String(“I love Computer Subject”);” what do we call
str1?
a) String object
b) String class
c) Character class
d) Reference variable
52. In statement “String str1=new String(“I love Computer Subject”);” what do we call
“I love Computer Subject”?
a) String object
b) String class
c) Character class
d) Reference variable
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
53. Which of the following constructor is used for without arguments create a string
object with no character?
a) String(String literal)
b) String()
c) String (char ary[])
d) String (String strobj)
54. Which type of constructor creates a string object with its initial values using array
argument?
a) String(String literal)
b) String (String strobj)
c) String (char ary[])
d) string()
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
55. To make a string object which of the following constructors is used to create a string
object using 1-D ary argument starting at ary[start] with len number of character?
a) String(char ary[], int start, int len)
b) String(int start, int length)
c) String(int length, int start)
d) String(char ary[], int len)
56. Which constructor creates a string object which is same as object specified in
argument?
a) String(String literal)
b) String (String strobj)
c) String (char ary[])
d) string()
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
57. Separate memory is allocated when string objects are created using ………..operator.
a) Public
b) Private
c) Static
d) New
58. When two String objects are created using same string literals, memory space is not
allocated for …………… object.
a) zero
b) First
c) second
d) None of these
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N
59. What happen when we create a String object str1 and str2 without using new
operator?
a) Only str2 refer to different memory location.
b) Only str1 refer to different memory location.
c) str1 and str2 refer to the same instance as created for str1.
d) Both str1 and str2 refer to different memory location.
60. What happen when we create a String object st1 and st2 using new operator?
a) Only str2 refer to different memory location.
b) Only str1 refer to different memory location.
c) str1 and str2 refer to the same instance as created for str1.
d) Both str1 and str2 refer to different memory location.
C
o
m
p
i
l
e
d
b
y
N
U
Z
H
A
T
M
E
M
O
N

More Related Content

What's hot (20)

Abstraction in java
Abstraction in javaAbstraction in java
Abstraction in java
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 
Java method
Java methodJava method
Java method
 
Exception Handling In Java
Exception Handling In JavaException Handling In Java
Exception Handling In Java
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 
Java interface
Java interfaceJava interface
Java interface
 
7.data types in c#
7.data types in c#7.data types in c#
7.data types in c#
 
Java static keyword
Java static keywordJava static keyword
Java static keyword
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
 
Core java
Core javaCore java
Core java
 
Android Layout
Android LayoutAndroid Layout
Android Layout
 
Java awt
Java awtJava awt
Java awt
 
Java Multiple Choice Questions and Answers
Java Multiple Choice Questions and AnswersJava Multiple Choice Questions and Answers
Java Multiple Choice Questions and Answers
 
Inheritance C#
Inheritance C#Inheritance C#
Inheritance C#
 
Android adapters
Android adaptersAndroid adapters
Android adapters
 
OOP Assignment 03.pdf
OOP Assignment 03.pdfOOP Assignment 03.pdf
OOP Assignment 03.pdf
 
Constructor ppt
Constructor pptConstructor ppt
Constructor ppt
 
JDBC
JDBCJDBC
JDBC
 

Similar to Std 12 Computer Chapter 9 Working with Array and String in Java important MCQs

Data Structure.pdf
Data Structure.pdfData Structure.pdf
Data Structure.pdfIT Eagers
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfahmed8651
 
Ds qb 2021 rma
Ds qb 2021 rmaDs qb 2021 rma
Ds qb 2021 rmaARAVINDRM2
 
this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentsthis pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentspavan81088
 
Std 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQsStd 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQsNuzhat Memon
 
C programming & data structure
C programming & data structureC programming & data structure
C programming & data structurerajeev_123
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012C aptitude 1st jan 2012
C aptitude 1st jan 2012Kishor Parkhe
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsemGopi Saiteja
 
Model question paper_mc0061
Model question paper_mc0061Model question paper_mc0061
Model question paper_mc0061gurbaxrawat
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxgitagrimston
 
Java Questioner for
Java Questioner for Java Questioner for
Java Questioner for Abhay Korat
 
Technical aptitude questions_e_book1
Technical aptitude questions_e_book1Technical aptitude questions_e_book1
Technical aptitude questions_e_book1Sateesh Allu
 
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfLDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfVedant Gavhane
 
GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004Rohit Garg
 
Ee693 questionshomework
Ee693 questionshomeworkEe693 questionshomework
Ee693 questionshomeworkGopi Saiteja
 

Similar to Std 12 Computer Chapter 9 Working with Array and String in Java important MCQs (20)

Data Structure.pdf
Data Structure.pdfData Structure.pdf
Data Structure.pdf
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdf
 
Cs101 endsem 2014
Cs101 endsem 2014Cs101 endsem 2014
Cs101 endsem 2014
 
Ds qb 2021 rma
Ds qb 2021 rmaDs qb 2021 rma
Ds qb 2021 rma
 
this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentsthis pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming students
 
Std 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQsStd 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQs
 
C programming & data structure
C programming & data structureC programming & data structure
C programming & data structure
 
C MCQ
C MCQC MCQ
C MCQ
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012C aptitude 1st jan 2012
C aptitude 1st jan 2012
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqp
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsem
 
Model question paper_mc0061
Model question paper_mc0061Model question paper_mc0061
Model question paper_mc0061
 
Data structure
Data structureData structure
Data structure
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docx
 
Java Questioner for
Java Questioner for Java Questioner for
Java Questioner for
 
Technical aptitude questions_e_book1
Technical aptitude questions_e_book1Technical aptitude questions_e_book1
Technical aptitude questions_e_book1
 
Data structure part 1
Data structure part  1Data structure part  1
Data structure part 1
 
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfLDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
 
GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004
 
Ee693 questionshomework
Ee693 questionshomeworkEe693 questionshomework
Ee693 questionshomework
 

More from Nuzhat Memon

Std 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsStd 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsNuzhat Memon
 
Std 12 chapter 7 Java Basics Important MCQs
Std 12 chapter 7 Java Basics Important MCQsStd 12 chapter 7 Java Basics Important MCQs
Std 12 chapter 7 Java Basics Important MCQsNuzhat Memon
 
Std 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQsStd 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQsNuzhat Memon
 
Std 12 computer java basics part 3 control structure
Std 12 computer java basics part 3 control structureStd 12 computer java basics part 3 control structure
Std 12 computer java basics part 3 control structureNuzhat Memon
 
Std 12 Computer Chapter 7 Java Basics (Part 2)
Std 12 Computer Chapter 7 Java Basics (Part 2)Std 12 Computer Chapter 7 Java Basics (Part 2)
Std 12 Computer Chapter 7 Java Basics (Part 2)Nuzhat Memon
 
Std 12 Computer Chapter 13 other useful free tools and services important MCQs
Std 12 Computer Chapter 13 other useful free tools and services important MCQsStd 12 Computer Chapter 13 other useful free tools and services important MCQs
Std 12 Computer Chapter 13 other useful free tools and services important MCQsNuzhat Memon
 
Std 12 computer chapter 8 classes and object in java (part 2)
Std 12 computer chapter 8 classes and object in java (part 2)Std 12 computer chapter 8 classes and object in java (part 2)
Std 12 computer chapter 8 classes and object in java (part 2)Nuzhat Memon
 
Std 10 computer chapter 10 introduction to c language (part2)
Std 10 computer chapter 10 introduction to c language (part2)Std 10 computer chapter 10 introduction to c language (part2)
Std 10 computer chapter 10 introduction to c language (part2)Nuzhat Memon
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingNuzhat Memon
 
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...Nuzhat Memon
 
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)Nuzhat Memon
 
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1 Basics Opera...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1  Basics Opera...Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1  Basics Opera...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1 Basics Opera...Nuzhat Memon
 
Std 11 Computer Chapter 4 Introduction to Layers (Part 3 Solving Textual Exe...
Std 11 Computer Chapter 4 Introduction to Layers  (Part 3 Solving Textual Exe...Std 11 Computer Chapter 4 Introduction to Layers  (Part 3 Solving Textual Exe...
Std 11 Computer Chapter 4 Introduction to Layers (Part 3 Solving Textual Exe...Nuzhat Memon
 
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...Nuzhat Memon
 
Std 11 Computer Chapter 4 Introduction to Layers
Std 11 Computer Chapter 4 Introduction to LayersStd 11 Computer Chapter 4 Introduction to Layers
Std 11 Computer Chapter 4 Introduction to LayersNuzhat Memon
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 3) [practica...
Std 11 Computer Chapter 3  Creating Animation using Synfig (Part 3) [practica...Std 11 Computer Chapter 3  Creating Animation using Synfig (Part 3) [practica...
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 3) [practica...Nuzhat Memon
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)Nuzhat Memon
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 2) [prac-anim...
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 2) [prac-anim...Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 2) [prac-anim...
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 2) [prac-anim...Nuzhat Memon
 
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...
Std 11 Computer Chapter 2 Animation Tool:  synfig (Part 2 Different Tools in ...Std 11 Computer Chapter 2 Animation Tool:  synfig (Part 2 Different Tools in ...
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...Nuzhat Memon
 

More from Nuzhat Memon (20)

Std 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsStd 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQs
 
Std 12 chapter 7 Java Basics Important MCQs
Std 12 chapter 7 Java Basics Important MCQsStd 12 chapter 7 Java Basics Important MCQs
Std 12 chapter 7 Java Basics Important MCQs
 
Std 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQsStd 12 computer chapter 8 classes and objects in java important MCQs
Std 12 computer chapter 8 classes and objects in java important MCQs
 
Std 12 computer java basics part 3 control structure
Std 12 computer java basics part 3 control structureStd 12 computer java basics part 3 control structure
Std 12 computer java basics part 3 control structure
 
Std 12 Computer Chapter 7 Java Basics (Part 2)
Std 12 Computer Chapter 7 Java Basics (Part 2)Std 12 Computer Chapter 7 Java Basics (Part 2)
Std 12 Computer Chapter 7 Java Basics (Part 2)
 
Std 12 Computer Chapter 13 other useful free tools and services important MCQs
Std 12 Computer Chapter 13 other useful free tools and services important MCQsStd 12 Computer Chapter 13 other useful free tools and services important MCQs
Std 12 Computer Chapter 13 other useful free tools and services important MCQs
 
Std 12 computer chapter 8 classes and object in java (part 2)
Std 12 computer chapter 8 classes and object in java (part 2)Std 12 computer chapter 8 classes and object in java (part 2)
Std 12 computer chapter 8 classes and object in java (part 2)
 
Std 10 computer chapter 10 introduction to c language (part2)
Std 10 computer chapter 10 introduction to c language (part2)Std 10 computer chapter 10 introduction to c language (part2)
Std 10 computer chapter 10 introduction to c language (part2)
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem Solving
 
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 3: Masking to R...
 
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
Chapter 5 Using Pictures in Synfig (Practical 2: Masking to hide area in synfig)
 
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1 Basics Opera...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1  Basics Opera...Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1  Basics Opera...
Std 11 Computer Chapter 5 Using Pictures in Synfig (Practical 1 Basics Opera...
 
Std 11 Computer Chapter 4 Introduction to Layers (Part 3 Solving Textual Exe...
Std 11 Computer Chapter 4 Introduction to Layers  (Part 3 Solving Textual Exe...Std 11 Computer Chapter 4 Introduction to Layers  (Part 3 Solving Textual Exe...
Std 11 Computer Chapter 4 Introduction to Layers (Part 3 Solving Textual Exe...
 
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
Std 11 Computer Chapter 4 Introduction to Layers (Part 2 Practical :Rotation ...
 
Std 11 Computer Chapter 4 Introduction to Layers
Std 11 Computer Chapter 4 Introduction to LayersStd 11 Computer Chapter 4 Introduction to Layers
Std 11 Computer Chapter 4 Introduction to Layers
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 3) [practica...
Std 11 Computer Chapter 3  Creating Animation using Synfig (Part 3) [practica...Std 11 Computer Chapter 3  Creating Animation using Synfig (Part 3) [practica...
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 3) [practica...
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
Std 11 Computer Chapter 3 Creating Animation using Synfig (part 1)
 
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 2) [prac-anim...
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 2) [prac-anim...Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 2) [prac-anim...
Std 11 Computer Chapter 3 Creating Animation using Synfig (Part 2) [prac-anim...
 
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...
Std 11 Computer Chapter 2 Animation Tool:  synfig (Part 2 Different Tools in ...Std 11 Computer Chapter 2 Animation Tool:  synfig (Part 2 Different Tools in ...
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...
 

Recently uploaded

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Recently uploaded (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Std 12 Computer Chapter 9 Working with Array and String in Java important MCQs

  • 2. C o m p i l e d b y N U Z H A T M E M O N 1. What do we call the basic data type which can store only one value at a time? a) Local variable b) Scalar variable c) Static variable d) Instance variable 2. What do we call the data type that can be used to store a collection of more than one data values? a) Scalar variable b) Constructor c) Basic variable d) Composite variable
  • 3. C o m p i l e d b y N U Z H A T M E M O N 3. Which kind of variable is a variable representing a collection of homogeneous type of elements? a) Array b) Global c) Instance d) Local 4. What is useful when same operations are to be performed on various elements of the similar type in Java ? a) String b) Array c) If ... Then d) While
  • 4. C o m p i l e d b y N U Z H A T M E M O N 5. Arrays are useful to represent which type of data in Java ? a) Vector b) Matrix c) Multi dimensional d) All of these 6. Which of the following are useful to represent vector, matrix and other multi - dimensional data ? a) Variable b) Element c) Tag d) Array
  • 5. C o m p i l e d b y N U Z H A T M E M O N 7. Java does not support ............. type of an array. a) 1 D b) 2 D c) Multi – dimensional d) Both b and c 8. ................. is a 1D data structure that can be used to store list of items like character, numbers in Java. a) Matrix b) Vector c) Composite d) Static
  • 6. C o m p i l e d b y N U Z H A T M E M O N 9. .............. is used to represent 2 – D data structure like table of rows and columns. a) Matrix b) Vector c) Composite d) Static 10. Which type of array is used like table of rows and columns ? a) Primitive array b) Minor array c) 1- D array d) 2- D array
  • 7. C o m p i l e d b y N U Z H A T M E M O N 11. How do we identify each element of array? a) By a pointer b) By an index position c) By memory allocation d) All of these 12. An index position of an array is associated with array .................. a) Method b) Function c) Variable d) Class
  • 8. C o m p i l e d b y N U Z H A T M E M O N 13. What specifies the position of an element in an array ? a) Serial b) Index c) Number d) Class 14. Which of the following refer to the starting index value in arrays? a) 1 b) 0 c) Null d) All of these
  • 9. C o m p i l e d b y N U Z H A T M E M O N 15. What is the process of making an object used to manage list of items in array? a) Declare an array object b) Create an array object c) Both (a) and (b) d) Define object method 16. An array object can be created in how many ways ? a) Directly initializing the content of array b) Specify the size c) Using new operator and specifying the size d) Both a and c
  • 11. C o m p i l e d b y N U Z H A T M E M O N 17. Which of the following syntax is used to declare array in java ? a) <data type>[ ] < array name>[]; b) <data type><array name> [ ]; c) Both (a) and (b) d) None of these 18. Declaring an array without ......... does not create an array object. a) Declaration b) Initialization c) Instantiation d) None of these
  • 12. C o m p i l e d b y N U Z H A T M E M O N 19. In java, initial value of array elements are specified into what brackets ? OR Which type of braces is used to initialize data elements in 1-D array? a) () b) {} c) [] d) <> 20. In java, initial value for 1 – D array are separated using which symbol? OR In java, by using which sign 1-D array is initialized to separate values of data elements in braces() ? a) – (dash) b) : (colon) c) ,(comma) d) .(full stop)
  • 13. C o m p i l e d b y N U Z H A T M E M O N 21. Which of the following an example of data element of array? a) int marks[ ]={50,60,70}; b) int marks[3]={50,60,70}; c) int marks[ ]=(50,60,70); d) int marks[ ]={50;60;70}; 22. Size of each row can be known using ..... property of 1 – D array. a) Size b) Length c) Width d) Row
  • 14. C o m p i l e d b y N U Z H A T M E M O N 23. In java, how can be array elements accessed using index for each dimension in? a) () b) {} c) [] d) <> 24. If ‘int marks[]={1,2,3,4,5};’ is defined in java what will be the value of marks[3] ? a) 3 b) 2 c) 4 d) 5
  • 15. C o m p i l e d b y N U Z H A T M E M O N 25. In java, we can not specify both the size of ....... and ....... values of the array elements simultaneously while declaring an array. a) Class & Variable b) Dimensions & Length c) Initial & Value d) Dimensions and Initial 26. Which of the following is not a right statement to declare an array named marks in java ? a) int marks[]=new int[3] b) int marks[3]={50, 60, 70} c) int[] marks=new int[3] d) None of these
  • 16. C o m p i l e d b y N U Z H A T M E M O N 27. How many bytes are used to store the int marks[] = new int [5] array ? a) 5 X 1 = 5 b) 5 X 2 = 10 c) 5 X 4 = 20 d) 5 X 8 = 40 28. Sort and fill() are methods of which of the following java class? OR We can use various static methods provided by Java using which array class? a) java.util.io b) java.util.Arrays c) java.io.Arrays d) java.lang.Arrays
  • 17. C o m p i l e d b y N U Z H A T M E M O N 29. Which type of method is used to sort entire or part of array in java ? a) fill() b) sort() c) show() d) search() 30. In java, which method is used to fill the whole or partial array with specified value? OR Which method of java.util.Arrays class is used to fill the whole or partial array with specified value ? a) sort() b) set() c) insert() d) fill()
  • 18. C o m p i l e d b y N U Z H A T M E M O N 31. If you want to assigns value 7 to all elements of list array then which method is used? a) fill (ls,7) b) fill(list, 7) c) sort(list, 7) d) fill(7) 32. What will done with command “fill (list, 2,6, 5);”? a) Assigns array list value 5 to element list [5] to list [6 – 1] b) Assigns array list value 6 to element list [2] to list[5 – 1] c) Assigns array list value 5 to element list [2] to list[6 – 1] d) None of these
  • 19. C o m p i l e d b y N U Z H A T M E M O N 33. In java, to search an element in an array, array class provides which type of method? a) sort() b) fill() c) binarySearch() d) remove() 34. Which method in java, is used to search element by element comparison in a serial fashion ? a) Linear search b) Find c) Binary search d) Look
  • 21. C o m p i l e d b y N U Z H A T M E M O N 35. If we write “int marks [][]=new int [5][3]” then which view shows the elements of array in a table of 5 rows and 3 columns ? a) Index view b) Display view c) Logical view d) Physically view 36. In java, which view of array is stored in memory using contiguous memory? a) Index view a) Display view b) Logical view c) Physically view
  • 22. C o m p i l e d b y N U Z H A T M E M O N 37. Which braces is used in 2 D array using comma separated values of data elements ? a) [] (square bracket) b) () (simple bracket) c) <> (angled bracket) d) {} (curly bracket) 38. In the following statement for declaring two dimensional array of java 5 represent what? int marks[][]=new int[5][3]; a) Array size b) Number of columns c) Number of rows d) Number of bytes
  • 23. C o m p i l e d b y N U Z H A T M E M O N 39. What is the size of second dimension in an array sale [5][12] ? a) 5 b) 10 c) 12 d) 60 40. What is the size of second dimension in an array gseb [5] [3] ? a) 3 b) 5 c) 15 d) 18
  • 24. C o m p i l e d b y N U Z H A T M E M O N 41. Which property is used with only array name returns the size of its first dimension in java? a) Byte b) Length c) Width d) Size 42. How many integer values will be stored in the following array ? int marks[][]=new int[4][4];? a) 4 b) 8 c) 16 d) 644 2.
  • 25. C o m p i l e d b y N U Z H A T M E M O N 43. What expression sales. length return for an array sales[5][12] ? a) 5 b) 10 c) 12 d) 60 44. When an array sales[5][12] is declared without specifying initial values, what is the initial value of sales[0][0] ? a) 0 b) Default value c) 60 d) Compilation error
  • 26. C o m p i l e d b y N U Z H A T M E M O N 45. In statement “int marks [][]=new int [5][3]” occupy how many memory ? a) 15 (5*3) integers that store 0 bytes b) 15 (5*3) integers that store 60 (15*4) bytes c) 15(5*3) integers that store 15 bytes d) None of these 46. How many bytes of location are occupied by an array ‘b’ of int b[][]=new int[5][3];? a) 3 b) 5 c) 15 d) 60
  • 28. C o m p i l e d b y N U Z H A T M E M O N 47. 1-D array of characters can be considered as a…………….. OR …….. is considered as a sequence of characters a) Character b) String c) Integer d) Long 48. In java, string literals, a sequence of characters is enclosed between which sign? a) ‘ ‘(single quote) b) “ “(double quotes) c) <> d) /*….*/
  • 29. C o m p i l e d b y N U Z H A T M E M O N 49. Java supports two types of strings that are handled by which of the following class? a) String b) StringBuffer c) character d) Both (a) and (b) 50. Which operator can be used to concatenate a string in java? a) = b) + c) & d) *
  • 30. C o m p i l e d b y N U Z H A T M E M O N 51. In statement “String str1=new String(“I love Computer Subject”);” what do we call str1? a) String object b) String class c) Character class d) Reference variable 52. In statement “String str1=new String(“I love Computer Subject”);” what do we call “I love Computer Subject”? a) String object b) String class c) Character class d) Reference variable
  • 31. C o m p i l e d b y N U Z H A T M E M O N 53. Which of the following constructor is used for without arguments create a string object with no character? a) String(String literal) b) String() c) String (char ary[]) d) String (String strobj) 54. Which type of constructor creates a string object with its initial values using array argument? a) String(String literal) b) String (String strobj) c) String (char ary[]) d) string()
  • 32. C o m p i l e d b y N U Z H A T M E M O N 55. To make a string object which of the following constructors is used to create a string object using 1-D ary argument starting at ary[start] with len number of character? a) String(char ary[], int start, int len) b) String(int start, int length) c) String(int length, int start) d) String(char ary[], int len) 56. Which constructor creates a string object which is same as object specified in argument? a) String(String literal) b) String (String strobj) c) String (char ary[]) d) string()
  • 33. C o m p i l e d b y N U Z H A T M E M O N 57. Separate memory is allocated when string objects are created using ………..operator. a) Public b) Private c) Static d) New 58. When two String objects are created using same string literals, memory space is not allocated for …………… object. a) zero b) First c) second d) None of these
  • 34. C o m p i l e d b y N U Z H A T M E M O N 59. What happen when we create a String object str1 and str2 without using new operator? a) Only str2 refer to different memory location. b) Only str1 refer to different memory location. c) str1 and str2 refer to the same instance as created for str1. d) Both str1 and str2 refer to different memory location. 60. What happen when we create a String object st1 and st2 using new operator? a) Only str2 refer to different memory location. b) Only str1 refer to different memory location. c) str1 and str2 refer to the same instance as created for str1. d) Both str1 and str2 refer to different memory location.