Top Posters
Since Sunday
e
5
e
4
4
d
4
o
3
p
3
t
3
3
m
3
p
3
m
3
f
3
New Topic  
Oughto Oughto
wrote...
Posts: 742
Rep: 1 0
7 years ago
If str1 and str2 are both Strings, which of the following expressions will correctly determine whether they are equal?

(1) (str1 == str2)
(2)  str1.equals(str2)
(3) (str1.compareTo(str2) == 0)

A) 1, 2, and 3 will all work.
B) 2 and 3
C) 1 and 2
D) 1 and 3
Textbook 
Starting Out with Java: Early Objects

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 141 times
3 Replies
Replies
Answer verified by a subject expert
ToothyToothy
wrote...
Top Poster
Posts: 744
Rep: 4 0
7 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

Oughto Author
wrote...
7 years ago
I literally took this as a gen ed course, I was lost thought it would be easy

thx for making it easier on me
wrote...
7 years ago
Thanks for providing feedback
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  977 People Browsing
 106 Signed Up Today
Related Images
  
 288
  
 346
  
 156
Your Opinion
Which of the following is the best resource to supplement your studies:
Votes: 292

Previous poll results: What's your favorite coffee beverage?