Computer Science 1
Number 9.)
2
Number 20.)
4
Number 19.)
Yes, (int)
Data types smallest to largest
Char, int, double, string
What is (6%2) *7?
0
Number 18.)
Char q = (char) Math.abs(-82);
Which character is not allowed in a variable name?
&
Number 16.)
97.6
Which of the following is a legal variable name in Java?
Ans
What is the best way to avoid round off error?
Convert doubles to ints and do calculations using integers
What is modular division not used for?
Converting decimals to whole numbers
What is a legal variable assignments in Java?
Double n=3;
Number 17.)
Error: possible loss of precision
Which would properly create A and B as integer variables?
Int A, B;
Number 14.)
Nothing wrong
Which of the following is not a primitive data type?
String
Which of the following correctly inputs a String?
String Val= scan.nextLine();
Which correctly stores the word umbrella in a variable called stuff?
String stuff = "umbrella";
Number 8.)
The answer is 519
Which of the following is a legal variable name in java?
\n