//プログラムは、if ステートメントに記述された行を常に出力します。// また、else ステートメントを追加しようとするたびに、Eclipse がエラーを返します
import java.util.Scanner;
import java.util.Arrays;
public class Practice {
public static void main(String[] args)
Scanner input = new Scanner(System.in);
System.out.println("Enter the number of artists you would like to search: ");
int number = input.nextInt();
String junk = input.nextLine();
String []artist = new String[number];
for(int i=0; i < number ; i++)
{
artist[i]= input.nextLine();
}
System.out.println("Here is the list of artists you searched for: " + Arrays.toString(artist) + ". Is this correct?");
String check = input.nextLine();
if((check.equalsIgnoreCase("yes") || check.equalsIgnoreCase("y")) == false); //this continually returns both print statements in and out of the if statement even if I input something other than yes or y and I have no idea why
{
System.out.println("Cool! Enjoy your search!"); //this always prints no matter what
}
System.out.println("Please try again! Sorry for the inconvenience!"); //won't let me add an else statement