Java In Practice Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Writes out the characters inside the quote marks on the line.

A

system.out.println

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

What are the 2 kinds of import statements?

A
1. Specific - imports a single class into the program
import javax.swing.JOptionPane;
  1. Wild card - imports all the classes
    import javax.swing.*;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What should the first statement in a Java file be?

A

A package declaration

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

The scheme for using bits to represent values.
It specifies three characteristic properties of a category of data: the range of values for an identifier of that category, the amount of storage used for a value of that category, and operations that can be performed on the values of that category.

A

Data Type

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

Primitive data types are fundamental and the ways to represent these are built into Java. What are the 8 types?

A

Byte, Short, Int, Long, Float, Double, Char, and Boolean

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

Bit patterns that show the end of a line of where to start pages.

A

Control Characters

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

A string object that contains no characters

A

Empty string

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

This method performs string concatenation. A new string is constructed using the data from two other strings

A

concat()

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

This means that after construction, a string object cannot be altered.

A

Immutable

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

This method of a string returns its length.

A

length()

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

This method of a string creates a new string that is the same as the original except that any leading or trailing space is trimmed off.

A

trim()

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

This method of a string object returns a single character at the specified index.

A

charAt()

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

T or F?

A data type specifies the representation of information.

A

True

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

T or F?

A data type indicates the range of values that the data type representation can have.

A

True

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

T or F?

A data type indicates the operations that can be performed on the values of the data type.

A

True

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

T or F?

In Java, primitive data types are objects.

A

False

17
Q

T or F?

In Java, a string is a primitive data type.

A

False

18
Q

T or F?

A data type indicates the number of bits used to store a value of a data type.

A

True

19
Q

T or F?

An identifier for a primitive data type is evaluated by reference.

A

False