Top Posters
Since Sunday
I
3
p
2
w
2
y
2
J
2
Q
2
r
2
o
2
e
2
j
2
d
2
T
2
New Topic  
Ingy_ Ingy_
wrote...
Posts: 514
4 years ago
In JDK 1.5, analyze the following code.

Line 1: Integer[] intArray = {1, 2, 3};
Line 2: int i = intArray[0] + intArray[1];
Line 3: int j = i + intArray[2];
Line 4: double d = intArray[0];


▸ Line 4 is OK. An int value from intArray[0] object is assigned to a double variable d.

▸ It is OK to automatically convert an Integer object to an int value in Line 2.

▸ It is OK to assign 1, 2, 3 to an array of Integer objects in JDK 1.5.

▸ It is OK to mix an int value with an Integer object in an expression in Line 3.
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 44 times
1 Reply
Replies
Answer verified by a subject expert
binvabinva
wrote...
Posts: 369
4 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here

Related Topics

Ingy_ Author
wrote...

4 years ago
Brilliant
wrote...

Yesterday
Helped a lot
wrote...

2 hours ago
this is exactly what I needed
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  413 People Browsing
Show Emoticons
:):(;):P:D:|:O:?:nerd:8o:glasses::-):-(:-*O:-D>:-D:o):idea::important::help::error::warning::favorite:
Related Images
  
 391
  
 87
  
 359
Your Opinion
Which 'study break' activity do you find most distracting?
Votes: 824