I have been working on a program that is going to read two letters that you input and then delete them based on their starting letter.
My current problem is trying to figure a way how to read the starting letter no matter whether you enter lowercase or uppercase.
My current code:
for (int i = 0; i < list.size(); i++) {
if (list.get(i).startsWith(first)) {
start = i;
break;
}
}
for (int x = list.size() - 1; x > 0; x--) {
if (list.get(x).startsWith(second)) {
end = x;
break;
}
}
ArrayList contains case sensitivity checks the whole word I need to only check the first letter and I can't find anything after looking for two days on something to help me.