Mish-Mosh
It's a Bit "If'y"
Getting Input from the User
Strings
What's in a Name?
100
These 2 lines of programming code make it into just about every Java-based program... they could be said to be 'above' all else!
What are public class __________ and public static void main(String[] args)
100
It's what the If statement uses to redirect program flow.
What is the conditional *test*?
100
This procedure must be completed before the following line of code is allowed to compile: grossPay = hours * payRate;
What is (1) declare variables grossPay, hours, and payRate, (2) Create a Scanner object to read input, (3) assign hours and payRate content from Scanner class method, (4) assign grossPay product of hours and payRate.
100
This technique is used to gather string information into a variable satelliteType from the user through the system console assuming the object console_data.
What is satelliteType = console_data.nextLine(); 148
100
This particular 'class' is used to allow a programmer the ability to create objects that hold information like "computer" and "name" AND is written very specifically.
What is the string class? (String name, 71)
200
If you want to get fired from your job... stop showing up. If you want that same terminating effect in Java, you can definitely do so using this method!
What is System.exit(0);
200
This number reflects the number of different program or control paths available in the use of the If, and for that matter, the If/else...
What is 2.
200
These Scanner class methods are used for reading integers, doubles, and strings. AND, how are these methods used?
What are nextInt, nextDouble, and nextLine? variable = object.nextInt(); 87
200
This method is used to take string information held in a variable called input and return an integer value to be held in years.
What is years = Integer.parseInt(input); 140
200
Before a value can be stored in a variable, the value's data type must be compatible with this list of primitive data types.
What are double, float, long, int, short, and byte? (65)
300
This error prevented the following block of code from executing: case (score > 90): grade = 'A'; break; case (score > 80): grade = 'B'; break;
What is the case expression cannot have relational operators... they must be char, byte, short, or int
300
This single conditional test combines 2 evaluations into one test... a true result if a variable 'temp' is reflects below freezing or above 100 degree F values.
What is (temp < 32 || temp > 100)
300
These parts of the declaration of the Scanner object keyboard are necessary for subsequent input from the data from the user.
What is Scanner keyboard = new Scanner(System.in); 85
300
This method works exactly like the compareTo method, except the case of the characters in the strings being compared is ignored. And, what is the result of an string comparison where both strings are equal.
What is the compareToIgnoreCase method (result = string1.compareToIgnoreCase(string2) AND What is zero? (149)
300
This operator allows a programmer to manually convert a value.
What is the cast operator? ( (int)number, 65)
400
This error prevented the following block of code from executing: (picky, picky, picky...) double fahrenheit, celcius; kelvin; Celcius = 5.0/9.0 (fahrenheit-32.0);
What are: non-declared kelvin data type, celcius vs Celcius, and assumed multiplication between 5.0/9.0 and ( )
400
This error prevented the following block of code from executing: if (x==1); y=2; else if (x==2); y=3; else if (x==3); y=4;
What is the if statement being prematurely terminated with a semicolon...
400
These JOptionPane dialog boxes reflect a small graphic window that displays a message to the user OR requests input and the syntax of both?
What is the Message Dialog and what is the Input Dialog? And, what is JOptionPane.showMessageDialog and JOptionPane.showInputDialog?
400
This string class method is used to return a new string that is the lowercase equivalent of the string contained in the called object.
What is toUpperCase()? (String upper = message.toUpperCase(), 74)
400
This item is a variable whose value is read only and cannot be changed during the program's execution.
What is a named constant. (final double INTEREST_RATE, 69)
500
Originally named Oak, lawyers blocked the use of this product name for the now Java programming language before considering other researched name alternatives.
What are Java, DNA, and Silk?
500
This error prevented the following block of code from executing: if (num2 == 0) System.out.println("Division by zero error"); System.out.println("Please run again"); else Quotient = num1 / num2; System.out.println("Division performed"); System.out.println("Operations complete");
What is conditional execution of blocks of code require braces.
500
Assuming data exists in variables firstName and lastName, this syntax will display a graphical window to display: Hello ... it's great to see you!
What is: JOptionPane.showMessageDialog(null, "Hello " + firstName + " " + lastName + "... " + "it's great to see you!");
500
These two technique is used compare strings to each other... one comparison techique is correct and the other is *not*!
What is the String class 'equals' method and what is the == relational operator? (name1.equals(name2)) (name1 == name2), 144
500
This is combined assignment operator is used as the equivalent to x = x + 5.
What is x += 5 (64)