public String reverse()
{
int n = coins.size();
String reverseWords;
for(int i = n; i == 0; i--)
{
String s = coins.get(n);
reverseArray.add(s);
}
Type: Posts; User: jean28
public String reverse()
{
int n = coins.size();
String reverseWords;
for(int i = n; i == 0; i--)
{
String s = coins.get(n);
reverseArray.add(s);
}
Ok, so I stated a value to the array and effectively it fixed the Exception. However, now when I print it I just get an empty array instead of the expected words in reverse order. What is wrong with...
String reverseWords = reverseArray.toString();
Hey guys. I'm trying to make a class called "purse" where I make an array list and store String in it (quarters, dimes, etc), and then I print out the names of each coin I stored in the purse. I got...