|
|
|
|
|
|
Ch 2 Questions #2 Strings & Objects |
|
|
|
1. Describe a String literal. Give an example. 2. How would you determine the number of
characters in a String? 3. How do you declare a new reference to
an object? How do you instantiate the
object? 4. What is the difference between
declaration and instantiation? 5. What is String concatenation. What is the concatenation operator? 6. What will be output from the following System.out.print("Answer " + 89 +13);? 7. Describe inheritance. Why is it helpful in programming? 8. How are objects defined in Java? 9. What is meant by abstraction? How is the System.out.println(); an example of abstraction? 10. How would you get the computer to output
the first six lines of Poe's poem "Anabel Lee"
using a single print statement? |
|
|
|
|
|