Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Binder Early Objects
Quiz 4: Fundamental Data Types
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 61
Multiple Choice
What does the following statement sequence print? final String str = "Java"; Str += " is powerful"; System.out.println(str) ;
Question 62
Multiple Choice
What does the following statement sequence print? String str = "Hello"; Int n = str.length() ; String mystery = str.substring(0, 1) + str.substring(n - 2, n + 1) ; System.out.println(mystery) ;
Question 63
Multiple Choice
What does the following statement sequence print? String str = "Java"; Str += " is powerful"; System.out.println(str) ;
Question 64
Multiple Choice
What is the output of this code snippet? double average; Int grade1 = 87; Int grade2 = 94; // System.out.print("The average is " + (grade1 + grade2) / 2.0) ; System.out.print("The average is " + average) ;
Question 65
Multiple Choice
What is the difference between the result of the following two Java statements? I. int cents = (int) (100 * price + 0.5) ; II. int cents = (100 * price + 0.5) ;
Question 66
Multiple Choice
What does the following statement sequence print? String str = "Java Is Good"; Int n = str.length() ; String mystery = str.substring(n - 4, n) + Str) charAt(4) + str.substring(0, 4) ; System.out.println(mystery) ;
Question 67
Multiple Choice
What is the output of the following code snippet? Int counter = 0; Counter++; System.out.print("The initial value of the counter is ") ; System.out.println(count) ;
Question 68
Multiple Choice
What is the output of the following statement sequence? public static void main(String[] args) { Int x = 100.0 % 6.0; System.out.println(x) ; }
Question 69
Multiple Choice
Which statement about number literals in Java is false?
Question 70
Multiple Choice
Which option represents the best choice for a variable name to represent the average grade of students on an exam?
Question 71
Multiple Choice
The typical ranges for integers may seem strange but are derived from
Question 72
Multiple Choice
What is result of evaluating the following expression? (45 / 6) % 5
Question 73
Multiple Choice
Which of the following statements about constants in Java are true? I. Although not required, constants are commonly named using uppercase letters II. Only integer values can appear as constants III. A variable can be defined with an initial value, but the reserved word final prevents it from being changed IV. A named constant makes computations that use it clearer
Question 74
Multiple Choice
What is the output of this code snippet? Int sum = 22; Sum = sum + 2; System.out.print(sum) ; // sum = sum + 4; System.out.print(sum) ;
Question 75
Multiple Choice
What does the following statement sequence print if the user input is 123? public static void main(String[] args) { Scanner in = new Scanner(System.in) ; System.out.print("Enter a number ") ; Int myInt = in.nextInt() ; MyInt += 456; System.out.println(myInt) ; }
Question 76
Multiple Choice
The assignment operator
Question 77
Multiple Choice
What does the following statement sequence print? String str = "Harry"; Int n = str.length() ; String mystery = str.substring(0, 1) + str.substring(n - 2, n) ; System.out.println(mystery) ;
Question 78
Multiple Choice
Which statements about numeric types in Java are true? I. There is more than one integer type II. The data type float uses twice the storage of double III. The numeric range of the Java integer type is related to powers of two