Top Posters
Since Sunday
6
o
5
5
b
4
s
3
j
3
b
3
m
3
K
3
g
3
L
3
w
3
New Topic  
Izaganag Izaganag
wrote...
Posts: 686
Rep: 2 0
8 years ago
Consider the following two lines of code.  What can you say about s1 and s2?
   String s1 = "testing" + "123";
   String s2 = new String("testing 123");
A) s1 and s2 will compare "equal"
B) s1 and s2 are both references to the same String object
C) the line declaring s2 is legal Java; the line declaring s1 will produce a syntax error
D) s1 and s2 are both references to different String objects
E) none of the above
Textbook 
Java Software Solutions: Foundations of Program Design

Java Software Solutions: Foundations of Program Design


Edition: 7th
Authors:
Read 181 times
3 Replies
Replies
Answer verified by a subject expert
habibtihabibti
wrote...
Top Poster
Posts: 1486
8 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

Izaganag Author
wrote...
8 years ago
That makes life a whole lot easier, thank you for answering.
wrote...
8 years ago
Give me a shout if you need anymore help.
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1039 People Browsing
Related Images
  
 1081
  
 340
  
 59
Your Opinion
Who's your favorite biologist?
Votes: 587

Previous poll results: Do you believe in global warming?