1/29
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
what are 2 examples of programs that repeat
- count controlled
- sentinel controlled
define query controlled input
the program will ask the user if they want to continue after values are inputted and the program has run
what is it called when the program will ask the user if they want to continue after values are inputted and the program has run
query controlled input
what are the 4 parts of a menu driven program
- begins with a menu
- user will pick an option
- program will run
- menu will be displayed again
what do you call a program that, begins with a menu, user will pick an option, program will run, and menu will be displayed again
menu driven program
where is the printf statement located
in the java.io package
what are printf statements used for
used to print out number formats
what are used to print out number formats
printf statements
what is the letter for floating point number
f
what does the letter f mean
floating point number
what is the letter for decimal integer
d
what does the letter d mean
decimal integer
what is the letter for string
s
what does the letter s mean
string
what is used for the % sign
%%
what does %% mean
% sign
what is used for a new line
%n
what does %n mean
new line
(not neccessarily in notes) what should you always make sure matches up in printf statements
number of variables and type match
what does %- do
left justify (spaces go right instead of left)
what makes something left justified
%-
what does %, do
decimal separator (ex. 123,456)
what is the decimal separator
%,
what does %0 do
shows leading 0 (ex. 00012)
what shows the leading zeros
%0
in Scanner, which methods detect if data entered is in an invalid format
nextDouble, nextInt
what does try-catch do
detect an error, recover and the program will keep going
what can detect an error, recover and the program will keep going
try-catch statement
what exception is thrown when an invalid data type is used
Exception e
what exception is thrown when trying to divide by 0
Arithmetic Exception e