Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 22 pages
Exam (elaborations)

CS 7643 QUIZ 1 EXAM REVIEW SOLVED QUESTIONS COMPLETE ANSWERS GRADED A PLUS.pdf

Document preview thumbnail
Preview 3 out of 22 pages

CS 7643 QUIZ 1 EXAM REVIEW SOLVED QUESTIONS COMPLETE ANSWERS GRADED A PLUS.pdf

Content preview

CS 7643 QUIZ 1 EXAM REVIEW SOLVED QUESTIONS COMPLETE ANSWERS GRADED A PLUS




Question:
A literal string is called a(n) ____.

Answer:
anonymous object



Question:
In order to use a variable both with a try or catch block and afterward, you must declare the variable
before the ____ block begins.

Answer:
try



Question:
The ____ option must be used when running a program in order to see the results of assert
statements.

Answer:
-ea



Question:
A(n) ____ is a Java language feature that can help you detect logic errors that do not cause a
program to terminate, but nevertheless produce incorrect results.

Answer:
assertion

,Question:
What is the output of the following code: loopCount = 1;while(loopCount < 3){
System.out.println("Hello"); loopCount = loopCount + 1; }

Answer:
Hello Hello



Question:
A ____ chooses among alternative courses of action based on some value within a program.

Answer:
decision structure



Question:
A logical structure called a(n) ____ structure is when one step follows another unconditionally.

Answer:
sequence



Question:
Since the ArrayList class is part of the java.util package, you can use the java.util.*; import
statement to access it.

Answer:
True



Question:
An ArrayList's ____ is the number of items it can hold without having to increase its size.

Answer:
capacity

, Question:
The disadvantage to using the conditional operator is that it ____.

Answer:
can be difficult to read



Question:
Which of the following correctly declares and initializes a String object?

Answer:
String greeting = "Hello";



Question:
Which of the following println statements will display the last myScores element in an array of 10?

Answer:
System.out.println(vals[9]);



Question:
Which Java statement creates a jagged array with six rows?

Answer:
double [][] sales = new double[6][]



Question:
The logical OR operator

Answer:
||



Question:

Document information

Uploaded on
August 12, 2026
Number of pages
22
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$17.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
1
Followers
0
Items
3236
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions