Finals Exam Flashcards

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

A

length()

25
Q

same character as this string but with any uppercase letter converted to lowercase.
the content of the string object is _____

A

unchange
toLowerCase()

26
Q

But any lowercase letter converted into uppercase. the content of the string object is _____

A

Unchanged
toUpperCase();

27
Q

But with each occurrence of specified old_char ____ by new_char

A

replace(old_char , new_char)
Replaced

28
Q

Returns a new string having the same characters as the _____ begins at specified start index through to the end of the string

A

substring
substring (start_index)

29
Q

returns a new string having the same chatacters as this string. but with leading and trailing whitespace removed

A

trim()

30
Q

in java how many string method are

A

14

31
Q

An ____ It is a collection of a fixed number of a variables

A

Array

32
Q

It is a collection of a fixed number of a variables called ______ or components. wherein all the elements are of the ____ data type

A
  1. elements
  2. same
33
Q

Creating, Initializing, and ____ an array One-Dimensional Array

A

Accessing

34
Q

It declares the element type of the array
it determines the data type of each element that comprises the array

A

type

35
Q

you must ____ one using new and assign it to int array

A

Allocate

36
Q

when an array is declared, only a ____ of an array is created

A

reference

37
Q

____ determines the number of elements in the array

A

size

38
Q

it is the name of the array variable that is linked to the array

A

var-name

39
Q

zero for numeric types, false for boolean, and null for

A

reference type

40
Q

in java, all arrays are ___ allocated

A

dynamically

41
Q

each element in the array is accessed via its

A

index

42
Q

in java two dimensional array, data stores in row and ___

A

columns

43
Q

we can access the record using both the row index and column index like an ____

A

excel file

44
Q

it decides the type of elements it will accept

A

data_type

45
Q

this is the name to give it to this java two dimensional array

A

array_name

46
Q

a three dimensional can be defined as an

A

array of two-dimensional arrays

47
Q

three dimensional have total of

A

24 elements

48
Q

printing and accessing array elements in a three dimensional array is ___ to the two dimensional arrays

A

similar

49
Q

the above program displays a ___ of a three dimensional

A

tubular presentation

50
Q

The array to be search

A

a

51
Q

the value to be search

A

key

52
Q

the ____ is defined as the point at which the key would be inserted into the array

A

insertion point

53
Q

if the input list is not sorted the result is

A

undefined

54
Q

Returns true only if both arrays are ____

A

equal

55
Q

What is Unicode of the 0

A

48

56
Q

What is the unicode of capital letter A

A

65

57
Q

what is the unicode of the small letter a

A

97

58
Q

Array class makes it easier to perform ____ on an array

A

common operators