Finals Exam Flashcards

(58 cards)

1
Q

_____ are widely use in java programming

A

Strings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

a ____ of characters

A

sequence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Strings are ____

A

Objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The Java platform provides the String class to create and ____ strings

A

Manipulate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The string class is not a ___

A

Primitive Data Type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

First Character starts at index

A

Zero (0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The length starts at ___

A

one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Using the new keyword and ____ to create a string object

A

String constructor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The string literals in java are series of characters that will appear in output exactly as you _____

A

Entered

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

String literal are _____

A

Constant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Whenever the JVM encounters a string literal in a program it creates a string object with its ____

A

value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The string literals with the same contents share the ____

A

same memory location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

while the constructed strings using the new keyword stored in _____

A

different memory location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The string method, equals() is used to _______ the content of two strings

A

compare

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The _______ is used to compare the reference of two objects.

A

Relational Operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The string class is ____ once it created its content cannot be change

A

immutable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Returns the character of string based on the ______

A

specific index

charAt()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Compares a string to another string.
The method returns 0 if the string is equal to other string

A

compareTo(string)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

returns a new string concatenated with the value of the _____

A

parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

returns true if this string and the specified string are equal

A

equals(string)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Considering the uppercase and lowercase to be the same

A

equalsIgnoreCase(string)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

returns the first _____ of the specific string

A

indexOf(string)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

returns the index of the last ______ of the specified string

A

lastIndexOf(string)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

returns the length of the string

25
same character as this string but with any uppercase letter converted to lowercase. the content of the string object is _____
unchange toLowerCase()
26
But any lowercase letter converted into uppercase. the content of the string object is _____
Unchanged toUpperCase();
27
But with each occurrence of specified old_char ____ by new_char
replace(old_char , new_char) Replaced
28
Returns a new string having the same characters as the _____ begins at specified start index through to the end of the string
substring substring (start_index)
29
returns a new string having the same chatacters as this string. but with leading and trailing whitespace removed
trim()
30
in java how many string method are
14
31
An ____ It is a collection of a fixed number of a variables
Array
32
It is a collection of a fixed number of a variables called ______ or components. wherein all the elements are of the ____ data type
1. elements 2. same
33
Creating, Initializing, and ____ an array One-Dimensional Array
Accessing
34
It declares the element type of the array it determines the data type of each element that comprises the array
type
35
you must ____ one using new and assign it to int array
Allocate
36
when an array is declared, only a ____ of an array is created
reference
37
____ determines the number of elements in the array
size
38
it is the name of the array variable that is linked to the array
var-name
39
zero for numeric types, false for boolean, and null for
reference type
40
in java, all arrays are ___ allocated
dynamically
41
each element in the array is accessed via its
index
42
in java two dimensional array, data stores in row and ___
columns
43
we can access the record using both the row index and column index like an ____
excel file
44
it decides the type of elements it will accept
data_type
45
this is the name to give it to this java two dimensional array
array_name
46
a three dimensional can be defined as an
array of two-dimensional arrays
47
three dimensional have total of
24 elements
48
printing and accessing array elements in a three dimensional array is ___ to the two dimensional arrays
similar
49
the above program displays a ___ of a three dimensional
tubular presentation
50
The array to be search
a
51
the value to be search
key
52
the ____ is defined as the point at which the key would be inserted into the array
insertion point
53
if the input list is not sorted the result is
undefined
54
Returns true only if both arrays are ____
equal
55
What is Unicode of the 0
48
56
What is the unicode of capital letter A
65
57
what is the unicode of the small letter a
97
58
Array class makes it easier to perform ____ on an array
common operators