Questions from Starting Out With Java


Q: Modify the code you wrote in Question 18 so it adds all

Modify the code you wrote in Question 18 so it adds all of the numbers read from the file and displays their total.

See Answer

Q: How do you remove an item from an ArrayList object?

How do you remove an item from an ArrayList object?

See Answer

Q: How do you retrieve a specific item from an ArrayList object?

How do you retrieve a specific item from an ArrayList object?

See Answer

Q: How do you insert an item at a specific location in an

How do you insert an item at a specific location in an ArrayList object?

See Answer

Q: What would the valid subscript values be in a four-element

What would the valid subscript values be in a four-element array of doubles?

See Answer

Q: How do you determine an ArrayList object’s size?

How do you determine an ArrayList object’s size?

See Answer

Q: What is the difference between an ArrayList object’s size and

What is the difference between an ArrayList object’s size and its capacity?

See Answer

Q: What is the difference between an array’s size declarator and

What is the difference between an array’s size declarator and a subscript?

See Answer

Q: What does it mean for a subscript to be out-of

What does it mean for a subscript to be out-of-bounds?

See Answer

Q: What happens in Java when a program tries to use a subscript

What happens in Java when a program tries to use a subscript that is out-of-bounds?

See Answer