So this should continue to loop until user hits "ENTER" or the array is filled. But after entering the first element in the array it quits the loop.
do
{
System.out.print("Enter name (or <ENTER> if done): ");
names[index] = kb.nextLine();
if(! (names[index].equals("")))
{
System.out.print("Enter phone number: ");
phone[index] = kb.nextLine();
System.out.print("Enter email address: ");
email[index] = kb.nextLine();
index++;
break;
}
} while ( ! (names[index - 1].equals("")) && index < SIZE);
Corrected
do
{
System.out.print("Enter name (or <ENTER> if done): ");
names[index] = kb.nextLine();
if(! (names[index].equals("")))
{
System.out.print("Enter phone number: ");
phone[index] = kb.nextLine();
System.out.print("Enter email address: ");
email[index] = kb.nextLine();
}
index++;
} while ( ! (names[index - 1].equals("")) && index < SIZE);