You cannot close a statement without this
A semicolon ;
This can hold only one keyboard letter or symbol
Character (char)
This can add or concatenate a String
+
What is the final value of value1?
double value1 = 10.9;
double value2 = 100.95;
value1 =103.7;
value2 = 99.1;
103.7
Assume: import java.util.Scanner;
Scanner kb = new Scanner(System.in);
This method allows the user to input an integer
kb.nextInt();
This will close your main method and your class
Curly Brace }
This can hold only values of true or false
Boolean
This executes arithmetic subtraction
-
String memo = "Hello";
String message = "My name is Kevin.";
memo = "Goodbye";
message = "I like dogs.";
"I like dogs."
Assume: import java.util.Scanner;
Scanner kb = new Scanner(System.in);
This method allows the user to input a number and a decimal.
This describes the kind of data you have.
Data Type
This can hold any whole number
Integer (int)
This executes arithmetic multiplication
*
What is the final value of c1?
char c = 'B';
char c1 = 'V';
c1 = 'W';
String c2 = c+c1;
W
Assume: import java.util.Scanner;
Scanner kb = new Scanner(System.in);
This method allows the user to input a true or a false
kb.nextBoolean();
The definite number or text of something
Value
This can hold a number and a decimal value
Double (double)
This executes arithmetic division
/
What is the final value of secondInt?
int firstInt = 100;
int secondInt =38;
secondInt++;
secondInt = secondInt*2 +1;
79
Scanner kb = new Scanner(System.in);
This method allows the user to input a one-word text value.
kb.next();
A hexidecimal memory location in your computer given a name
Variable
This can hold any number of symbols in a line of text
String
This returns the remainder of a division
Modulus %
What is the final value of d3?
double d1 = 107.1;
double d2 = 107.9;
double d3 = (.2*(d1+d2)/d2)*0);
0
Assume: import java.util.Scanner
Scanner kb = new Scanner(System.in);
This method allows the user to enter multiple text phrases.
kb.nextLine();