Java In Practice Flashcards
Writes out the characters inside the quote marks on the line.
system.out.println
What are the 2 kinds of import statements?
1. Specific - imports a single class into the program import javax.swing.JOptionPane;
- Wild card - imports all the classes
import javax.swing.*;
What should the first statement in a Java file be?
A package declaration
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.
Data Type
Primitive data types are fundamental and the ways to represent these are built into Java. What are the 8 types?
Byte, Short, Int, Long, Float, Double, Char, and Boolean
Bit patterns that show the end of a line of where to start pages.
Control Characters
A string object that contains no characters
Empty string
This method performs string concatenation. A new string is constructed using the data from two other strings
concat()
This means that after construction, a string object cannot be altered.
Immutable
This method of a string returns its length.
length()
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.
trim()
This method of a string object returns a single character at the specified index.
charAt()
T or F?
A data type specifies the representation of information.
True
T or F?
A data type indicates the range of values that the data type representation can have.
True
T or F?
A data type indicates the operations that can be performed on the values of the data type.
True