100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
OSU CSE 2221 Final Review 2024 Actual Questions with Verified Answers, 100% Guarantee Pass £9.68   Add to cart

Exam (elaborations)

OSU CSE 2221 Final Review 2024 Actual Questions with Verified Answers, 100% Guarantee Pass

 5 views  0 purchase
  • Module
  • CSE 2221
  • Institution
  • CSE 2221

OSU CSE 2221 Final Review 2024 Actual Questions with Verified Answers, 100% Guarantee Pass

Preview 4 out of 37  pages

  • September 3, 2024
  • 37
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSE 2221
  • CSE 2221
avatar-seller
OSU CSE 2221 Final Review.pdf file:///C:/Users/HP/Desktop/SSSSSSS/OSU%20CSE%202221%20F




OSU CSE 2221 Final Review


1. The correct syntax for the "main" method signature is:


*a.* private static void main(String[] args)

*b.* public static String main(String[] args)

*c.* public static void main(String[] args)

*d.* public void main(String[] args)

*e.* none of the above: c

2. The Java compiler does the following:


*a.* checks a bytecode program in a ".class" file for run-time errors and if there are none, it

generates source code for that program in a ".java" file

*b.* checks a source code program in a ".java" file for run-time errors and if there are none,

it generates bytecode for that program in a ".class" file

*c.* checks a source code program in a ".java" file for compile-time errors and, if there are

none, it generates bytecode for that program in a ".class" file

*d.* checks a bytecode program in a ".class" file for compile-time errors and if there are





1 of 37 8/30/2024, 3:37

,OSU CSE 2221 Final Review.pdf file:///C:/Users/HP/Desktop/SSSSSSS/OSU%20CSE%202221%20F




none, it generates source code for that program in a ".java" file

*e.* none of the above: c

3. Which statement correctly defines a java constant?


*a.* const SPECIAL = 1234;

*b.* int SPECIAL = 1234;

*c.* int final SPECIAL = 1234;

*d.* final int SPECIAL = 1234;

*e.* const int SPECIAL = 1234;: d

4. What is the value of s after the following statement: String s

= (!true) + " : " + (10 + 4) + " is 104";

*a.* "!true : 104 is 104"

*b.* "false : 104 is 104"

*c.* "!true : 14 is 104"

*d.* "false : 14 is 104"

*e.* This is a compile-time error: d

5. The Checkstyle plugin for Eclipse is useful because:


*a.* it warns you of potential compile-time errors





2 of 37 8/30/2024, 3:37

,OSU CSE 2221 Final Review.pdf file:///C:/Users/HP/Desktop/SSSSSSS/OSU%20CSE%202221%20F




*b.* it helps you make your code understandable for yourself and other pro- grammers









3 of 37 8/30/2024, 3:37

,OSU CSE 2221 Final Review.pdf file:///C:/Users/HP/Desktop/SSSSSSS/OSU%20CSE%202221%20F




*c.* it prevents your code from making errors caught by assert statements

*d.* it tells you when code you have written does not obey its contract

*e.* none of the above: b

6. If x is an int variable, when does the boolean expression evaluate to true? ((x % 5 !=

0) && (x % 2 != 0))

*a.* when x is divisible by 5 or by 2 but not by both

*b.* when x is divisible by 10

*c.* when x is not divisible by 10

*d.* when x is neither divisible by 5 nor by 2

*e.* when x is either divisible by 5 or by 2: d

7. The nextDouble( ) method of r, a variable of type Random, returns a double in a range of

[0,1). Which of these expressions would you use to create a random number in the range of

[-3,3)?


*a.* r.nextDouble( ) * 3.0 - 3.0

*b.* (r.nextDouble( ) - 0.5) * 6.0

*c.* r.nextDouble( ) * 6.0 + 3.0

*d.* r.nextDouble( ) * 6.0 + 0.5





4 of 37 8/30/2024, 3:37

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller TIPSCORE. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £9.68. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73091 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£9.68
  • (0)
  Add to cart