Finals Exam Flashcards
_____ are widely use in java programming
Strings
a ____ of characters
sequence
Strings are ____
Objects
The Java platform provides the String class to create and ____ strings
Manipulate
The string class is not a ___
Primitive Data Type
First Character starts at index
Zero (0)
The length starts at ___
one
Using the new keyword and ____ to create a string object
String constructor
The string literals in java are series of characters that will appear in output exactly as you _____
Entered
String literal are _____
Constant
Whenever the JVM encounters a string literal in a program it creates a string object with its ____
value
The string literals with the same contents share the ____
same memory location
while the constructed strings using the new keyword stored in _____
different memory location
The string method, equals() is used to _______ the content of two strings
compare
The _______ is used to compare the reference of two objects.
Relational Operator
The string class is ____ once it created its content cannot be change
immutable
Returns the character of string based on the ______
specific index
charAt()
Compares a string to another string.
The method returns 0 if the string is equal to other string
compareTo(string)
returns a new string concatenated with the value of the _____
parameter
returns true if this string and the specified string are equal
equals(string)
Considering the uppercase and lowercase to be the same
equalsIgnoreCase(string)
returns the first _____ of the specific string
indexOf(string)
returns the index of the last ______ of the specified string
lastIndexOf(string)
returns the length of the string
length()
same character as this string but with any uppercase letter converted to lowercase.
the content of the string object is _____
unchange
toLowerCase()
But any lowercase letter converted into uppercase. the content of the string object is _____
Unchanged
toUpperCase();
But with each occurrence of specified old_char ____ by new_char
replace(old_char , new_char)
Replaced
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)
returns a new string having the same chatacters as this string. but with leading and trailing whitespace removed
trim()
in java how many string method are
14
An ____ It is a collection of a fixed number of a variables
Array
It is a collection of a fixed number of a variables called ______ or components. wherein all the elements are of the ____ data type
- elements
- same
Creating, Initializing, and ____ an array One-Dimensional Array
Accessing
It declares the element type of the array
it determines the data type of each element that comprises the array
type
you must ____ one using new and assign it to int array
Allocate
when an array is declared, only a ____ of an array is created
reference
____ determines the number of elements in the array
size
it is the name of the array variable that is linked to the array
var-name
zero for numeric types, false for boolean, and null for
reference type
in java, all arrays are ___ allocated
dynamically
each element in the array is accessed via its
index
in java two dimensional array, data stores in row and ___
columns
we can access the record using both the row index and column index like an ____
excel file
it decides the type of elements it will accept
data_type
this is the name to give it to this java two dimensional array
array_name
a three dimensional can be defined as an
array of two-dimensional arrays
three dimensional have total of
24 elements
printing and accessing array elements in a three dimensional array is ___ to the two dimensional arrays
similar
the above program displays a ___ of a three dimensional
tubular presentation
The array to be search
a
the value to be search
key
the ____ is defined as the point at which the key would be inserted into the array
insertion point
if the input list is not sorted the result is
undefined
Returns true only if both arrays are ____
equal
What is Unicode of the 0
48
What is the unicode of capital letter A
65
what is the unicode of the small letter a
97
Array class makes it easier to perform ____ on an array
common operators