• 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 2 out of 12 pages
Exam (elaborations)

CSCI 2010 MIDTERM fully solved 2025(graded A+).

Document preview thumbnail
Preview 2 out of 12 pages

CSCI 2010 MIDTERM fully solved 2025(graded A+).

Content preview

CSCI 2010 MIDTERM
fully solved
2025(graded A+)
If you compile a java source file containing a definition of class
called MyApp, what is the name of the file that contains the results -
answer MyApp.class


Given the code:
String greeting = "Hello there!";
System.out.println(greeting.length());
What is displayed to the screen? - answer 12


Which of the following objects is used to display normal output to
the screen? - answer System.out


Which of the following statements reads a number from the
keyboard? - answer number = keyboard.nextInt();


Which of the following keywords is NOT required when declaring a
named constant?


final
void
public
static - answer void

, The java compiler translates source code written in Java into which
of the following languages? - answer Bytecode


Which of the following is used to display formatted output? - answer
System.out.printf


What is the relationship between a class and an object? - answer A
class is a blueprint for creating objects


Which of the following statements does NOT increase the value of
the variable number by 1?


number += 1
number + 1
number = number + 1
number ++ - answer number + 1


which of the following is the correct way to test if two strings s1 and
s2 are exactly the same? - answer s1.equals(s2)


What is the difference between a while loop and a do-while loop -
answer A while loop evaluates its controlling boolean expression
before the body is executed.


A do-while loop evaluates its controlling boolean after the loop is
executed


Why is it a good idea to use a DEBUG flag when tracing variables? -
answer the DEBUG flag allows the programmer to easily turn the
tracing messages on and off

Document information

Uploaded on
December 24, 2024
Number of pages
12
Written in
2024/2025
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.
GUARANTEEDSUCCESS
4.3
(253)
Sold
691
Followers
314
Items
24783
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