I admit I am a Java infant, an unable to hold my head up on my own infant. I greatly appreciate any help or advice you may offer!

Here is the problem.

I have one class that describes attributes of a city.
I have another class that creates an object array using the city attributes.
One method of the second class is to take input for 2 cities: String a and String b.
The city names must be found in the array.
Then the distances between the two cities must be calculated and returned as a String.

I have the correct code for finding the city names.
I just don't know how to get all the distance from a+1 to b-1.

are the distances saved in a string array as well, or are they entered as strings by the user? to convert a string to an integer so that you can add and subtract etc, you should take a look at the Integer class.

am i understanding you correctly there?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.