100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CSCI21 - Java - Part 2 Exam Questions and Correct Answers Graded A+

Rating
-
Sold
-
Pages
3
Grade
A+
Uploaded on
23-01-2025
Written in
2024/2025

CSCI21 - Java - Part 2 Exam Questions and Correct Answers Graded A+ final double EPSILON = 1E-14; if (M(x-y) <= EPSILON) - Answers To avoid round-off error when comparing float-point numbers, test whether the are close enough: write syntax reTo(t) < 0 - Answers Comparing Strings s comes before t in the dictionary no object - Answers null reference means? == - Answers what relational operator do you use to test for null boolean data type - Answers only two possible values: true and false, lowercase, reserved words in java && - Answers Logical operator for "and" || - Answers logical operator for "or" ! - Answers logical operator for unary not condition ? then-value; else-value - Answers syntax of the ? operator switch Statement - Answers what statement do we use whenever the conditions in an if-else chain are designed to check for constant values representing a finite number of cases countable - Answers switch-case statement switch(exp) exp must be "__________" primitive type (byte, int, car, NOT float or double) entry point - Answers case literal - serves as the " _______" for the case when exp==literal Loops - Answers are used to repeatedly execute a statement or a group of statements for (expr1; expr2; expr3) statement - Answers for statement syntax: initialization of setup - Answers expr1 in the for statement syntax (i=1) condition - Answers expr2 in the for statement syntax (i<=3) expr3 - Answers expr3 in the for statement syntax (i++) for statement - Answers deciding which one to use: most appropriate when the number of iterations isknown (e.g. factorial) at least once - Answers in a do-while statement, the loop body is executed checked first - Answers in a while statement, the condition is ________ _____ before executing Object composition or aggregation - Answers object Objects can be composed of other objects - Have references to "parts" of the class as fields of the class - Objects can create instances of other objects Encapsulation - Answers The idea of "hiding" implementation details

Show more Read less
Institution
CSCI21 - Java - Part 2
Course
CSCI21 - Java - Part 2








Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CSCI21 - Java - Part 2
Course
CSCI21 - Java - Part 2

Document information

Uploaded on
January 23, 2025
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CSCI21 - Java - Part 2 Exam Questions and Correct Answers Graded A+

final double EPSILON = 1E-14;

if (Math.abs(x-y) <= EPSILON) - Answers To avoid round-off error when comparing float-point numbers,
test whether the are close enough: write syntax

s.compareTo(t) < 0 - Answers Comparing Strings

s comes before t in the dictionary

no object - Answers null reference means?

== - Answers what relational operator do you use to test for null

boolean data type - Answers only two possible values: true and false, lowercase, reserved words in java

&& - Answers Logical operator for "and"

|| - Answers logical operator for "or"

! - Answers logical operator for unary not

condition ? then-value; else-value - Answers syntax of the ? operator

switch Statement - Answers what statement do we use whenever the conditions in an if-else chain are
designed to check for constant values representing a finite number of cases

countable - Answers switch-case statement

switch(exp)

exp must be "__________" primitive type (byte, int, car, NOT float or double)

entry point - Answers case literal

- serves as the " _______" for the case when exp==literal

Loops - Answers are used to repeatedly execute a statement or a group of statements

for (expr1; expr2; expr3)

statement - Answers for statement syntax:

initialization of setup - Answers expr1 in the for statement syntax (i=1)

condition - Answers expr2 in the for statement syntax (i<=3)

expr3 - Answers expr3 in the for statement syntax (i++)

Get to know the seller

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.
TutorJosh Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
336
Member since
1 year
Number of followers
16
Documents
28319
Last sold
6 hours ago
Tutor Joshua

Here You will find all Documents and Package Deals Offered By Tutor Joshua.

3.6

53 reviews

5
18
4
14
3
12
2
0
1
9

Recently viewed by you

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

Frequently asked questions