Top Posters
Since Sunday
c
5
j
5
a
5
L
5
f
5
j
5
D
4
k
4
y
4
t
4
h
4
l
4
New Topic  
Eels Eels
wrote...
Posts: 716
Rep: 0 0
7 years ago
If str1 and str2 are both Strings, which of the following will correctly test to determine whether str1 is less than str2?

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

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

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 178 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

Eels Author
wrote...
7 years ago
I was nearly about to give up, thanks
wrote...
7 years ago
Good luck tackling the rest
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  876 People Browsing
 173 Signed Up Today
Related Images
  
 1085
  
 649
  
 273
Your Opinion
Who's your favorite biologist?
Votes: 587