Firstly... I am a new in Java...
I have a music dictionary that use an arreylist to store the terms and definition
The user use the terminal to interact with this dictionary.
private void addTerms ()
{
addTerm("Anathema","Atmosheric metal band from Liverpool, UK."
}
Because, I would like to make it more sophisticated, if someone write not a band but a letter eg A or B or C then the dictionary to give him as feedback all the bands that their first letter is A or B or C.
I am trying to do this with substring(0,1).
eg.
if (band.substring(0,1) = bandExists(band).substring(0,1)
{
System.out.println(i dont know what to print!!!!)
}
and another question...
if it works, and prints the bans names that their first letter is "A"
1. Agathodemon
2. Anathema
3. Annihilator
etc
how possible is to write a number eg 3 and to print out now the definition of the band?