1/45
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No study sessions yet.
Object
An instance of a class. The operator new is used to instantiate an object.
Dot (.) Operator
The operator used to access methods or variables within a class or object.
Format Specifier Syntax
The expressions in square brackets are optional.
PrintWriter
A class used to store the output of a program in a file (secondary storage).
Primitive type variables
Directly store data into their memory space.
Reference variables
Store the address of the object containing the data.
Object
An instance of a class. The operator new is used to instantiate an object.
Library
A collection of packages.
Package
Contains several classes.
Class
Contains several methods.
Method
A set of instructions.
String variables
Reference variables that store the address of a string object.
String object
An instance of the class String.
charAt(int index)
Returns the character at the position specified by index.
indexOf(char ch)
Returns the index of the first occurrence of the character specified by ch. Returns -1 if the character does not appear.
indexOf(char ch, int pos)
Returns the index of the first occurrence of the character specified by ch, beginning the search at pos. Returns -1 if not found.
indexOf(String str)
Returns the index of the first occurrence of the string specified by str. Returns -1 if not found.
indexOf(String str, int pos)
Returns the index of the first occurrence of the string specified by str, beginning the search at pos. Returns -1 if not found.
concat(String str)
Returns a string that is the current string concatenated with str.
length()
Returns the length of the string. Counting starts at 1.
replace(char charToBeReplaced, char charReplacedWith)
Returns a string in which every occurrence of charToBeReplaced is replaced with charReplacedWith.
substring(int beginIndex)
Returns a substring beginning at beginIndex until the end of the string.
substring(int beginIndex, int endIndex)
Returns a substring starting at beginIndex up to, but not including, endIndex.
toLowerCase()
Returns a string where all uppercase letters are replaced with lowercase letters.
toUpperCase()
Returns a string where all lowercase letters are replaced with uppercase letters.
formatString
A string specifying the format of the output.
argumentList
A list of constant values, variables, or expressions separated by commas.
Format Specifier Syntax
The syntax is: %[argument_index\$][flags][width][.precision]conversion. The expressions in square brackets are optional.
argument_index
A decimal integer indicating the position of the argument in the argument list.
flags
A set of characters that modify the output format.
width
A decimal integer indicating the minimum number of characters to be written to the output.
precision
A decimal integer usually used to restrict the number of characters or decimal places.
conversion
A character indicating how the argument should be formatted.
Numeric Strings
A string consisting of only integers or decimal numbers.
Wrapper Classes
Classes such as Integer, Float, and Double designed to convert a numeric string into a number.
parseInt
A method of the class Integer that converts a numeric integer string into a value of the type int.
parseFloat
A method of the class Float used to convert a numeric decimal string into a value of the type float.
parseDouble
A method of the class Double used to convert a numeric decimal string into a value of the type double.
JOptionPane
A class contained in the package javax.swing used for graphical input and output.
showInputDialog
A method in JOptionPane used to display a dialog box that captures user input as a string.
showMessageDialog
A method in JOptionPane used to display information in a dialog box.
System.exit(0)
The command used to terminate a program that utilizes JOptionPane.
File
An area in secondary storage used to hold information.
PrintWriter
A class used to store the output of a program in a file.
throws clause
A clause in a method heading where the method either handles an exception or throws it for the calling environment to handle.
FileNotFoundException
An exception that occurs if an input file does not exist or an output file cannot be created or accessed.