Java Reference
In-Depth Information
return getValue(dexValue * 2);
}
public static void main(String[] arguments) {
Recursion r = new Recursion();
System.out.println(r.dex);
}
}
What will be the output of this application?
a. -1
b. 17
c. 34
d. 136
The answer is available on the topic's website at http://www.java21days.com. Visit the
Day 8 page and click the Certification Practice link.
Exercises
To extend your knowledge of the subjects covered today, try the following exercises:
1. Add two more conditions to the ComicBooks application: “pristine mint” for topics
that should sell at five times their base price and “coverless” for topics that should
sell at one-tenth of their base price.
2. Create an application that uses a vector as a shopping cart that holds Fruit objects.
Each Fruit object should have a name, quantity, and price.
Where applicable, exercise solutions are offered on the topic's website at http://www.
java21days.com.
 
Search WWH ::




Custom Search