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
Exam (elaborations)

CSCI 470 EXAM 2 QUIZZES QUESTIONS AND ANSWERS

Rating
-
Sold
-
Pages
5
Uploaded on
22-02-2025
Written in
2024/2025

CSCI 470 EXAM 2 QUIZZES QUESTIONS AND ANSWERS....

Institution
CSCI 470
Course
CSCI 470

Content preview

What are the two ways can we compare for equality?

a. operator -> _______
b. method -> ________ - ANSWER a. ==
b. equals

I want to compare to primitives, what do I use?

a. ==
b. equals
c. compareto() - ANSWER a

I want to compare to strings, what do I use?

a. ==
b. equals
c. compareto() - ANSWER b

I want to compare two objects to see if they are at the same address,
what do I use?

a. ==
b. equals
c. compareto() - ANSWER a

I want to compare the contents of two objects to see if they are equal,
what do I use?

a. ==
b. equals
c. compareto() - ANSWER b

, If you have two custom classes that you create, you need to code a
custom equals method for comparing the contents of objects.

a. true
b. false - ANSWER a

All parameters in JAVA are passed by value.

a. true
b. false - ANSWER a

You call a method with a string, what is passed to the method?

a. The letters in the string object.
b. A copy of the string object.
c. A copy of the pointer to the string object. - ANSWER c

A pointer to an object should never be returned from a method.

a. true
b. false - ANSWER b

When passing an array to a method, a copy of the array is made.

a. true
b. false - ANSWER b

What is the term used for making another pointer on a reference object?
- ANSWER casting

What syntax is used to accomplish casting?

a. &
b. super
c. ( )
d. base - ANSWER c

One can always up cast into type Object if needed in any object.

Written for

Institution
CSCI 470
Course
CSCI 470

Document information

Uploaded on
February 22, 2025
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown

Subjects

$11.99
Get access to the full document:

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

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.
Mirror Liberty University
Follow You need to be logged in order to follow users or courses
Sold
425
Member since
3 year
Number of followers
137
Documents
4987
Last sold
1 week ago

3.8

59 reviews

5
23
4
18
3
9
2
4
1
5

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

Working on your references?

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

Working on your references?

Frequently asked questions