• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 24 pages
Exam (elaborations)

CMSC Exam Verified Exam Questions and Answers Latest update 2026/2027

Document preview thumbnail
Preview 3 out of 24 pages

CMSC Exam Verified Exam Questions and Answers Latest update 2026/2027

Content preview

CMSC Exam
Verified Exam Questions and Answers Latest update 2026/2027

Question:
1. Which of the following lines of code correctly writes
"Hello" to the screen.
Answer:
System.out.println("Hel-
lo");

Question:
2. Fill in the blanks of the code below : main(
args){
Answer:
Public, static, void, String[]

Question:
3. The class name does not have to be the same as the
file name
Answer:
False

Question:
4. The command to compile a Java program is:
Hello.java.
Answer:
Java

Question:
5. Explain the steps that need to happen to take code 1. Code is written
from it being written to it running and producing out- 2. Code is compiled
put. 3. The byte code is read
Answer:


Question:
6. What does the virtual machine do? Choose all answers 1. runs the class file
that apply.

,Answer:
2. runs the byte code

Question:
7. Logic errors are the hardest errors to find. T/F
Answer:
True

Question:
8. While running a program, it unexpectedly stops. What 1. runtime
type of error is that? Choose all answers that apply. 2. logic
Answer:


Question:
9. Write the algorithm for the following computer prob- Set ASSESS_PERCENT =
lem:
Bear Corporation needs a program to calculate their Enter month1Sales,
quarterly assessment fee. They will total the sales for month2Sales,
the past quarter (a three month period) and the pay Month3Sales
22% of the total sales as their quarterly assessment Calculate totalSales by
fee.
month2Sales,
Month3Sales
Answer:
0.22
adding month1Sales,
Calculate assessmentFee
by totalSales * AS-
SESS_PERCENT
Output assessmentFee

Question:
10. What is a variable? Choose all parts below that are
relevant.
Answer:
1. can change
2. memory location
3. named

, Question:
11. Name two primitive Java data types that represent
whole numbers.
Answer:
int, byte, short, long

Question:
12. Name two primitive Java data types that represent
floating point numbers.
Answer:
float, double

Question:
13. For each error shown below match it to the correct out- 1. Compile-time error
put: a compile-time error, run-time error, or no error. 2. run-time error
Answer:
4. compile-time error
5. compile-time error

Question:
3. compile-time error
Answer:
6. no error

Question:
1. System.out.Println("Greetings, Planet Earth!");
Answer:


Question:
2. System.out.println();
Answer:


Question:
3. float scale = 7854.345368564323;
Answer:

Document information

Uploaded on
October 16, 2026
Number of pages
24
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.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

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
22
Followers
0
Items
11510
Last sold
4 weeks 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