midterms Flashcards

1
Q

is a method that has only the heading with no body

A

abstract method

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

a class that is declared with the reserved word abstract in its heading.

A

abstract class

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

they “wrap” the primitive data type into an object of that class.

A

Wrapper class

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

an abnormal condition that occurs at runtime.

A

Exception

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

block of code that always executes, regardless of whether or not an exception is thrown.

A

finally block

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

handles the exception

A

catch block

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

a section of a code that executes when an Exception is passed to it.

A

catch block

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

Constructs a new String with the value “” containing no characters. The value is not null.

A

public String()

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

Constructs a new String that contains the same sequence of characters as the specified String argument.

A

public String (String value)

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

Constructs a new String containing the same sequence of characters contained in the
character array argument.

A

public String (char[] value)

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

Compares the current String object to str, and returns 0 only if the two strings contain the same sequence of characters (case sensative)

A

public int compareTo (String str)

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

Compares the current String object with obj and returns true if obj is another String
containing the same sequence of characters; false is returned otherwise.

A

public boolean equals (Object obj)

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

Performs a case-insensitive comparison of the current String object with str and returns true if str is another String containing the same sequence (ignoring case) of characters; false is returned otherwise.

A

public boolean equalsIgnoreCase (String str)

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

Returns the character at the specified index. The index may range from 0 to length() - 1.

A

public char charAt( int index )

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

Concatenates the specified String to the end of the current (this) String. If the length of the argument string is 0, then this String is returned.

A

public String concat( String str )

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

Returns the length of the current String.

A

public int length()

17
Q

Converts the String to uppercase.

A

public String toUpperCase()

18
Q

Converts the String to lowercase

A

public String toLowerCase()