How do I exit this loop when user presses ENTER. This is part of the codes I have done. I am having problems in how to code when user presses ENTER.
static String[] itemList = new String[10];
do {
System.out.print("Enter item (press ENTER to exit) " + (count + 1) + ": ");
String item = input.next();
itemList[count] = item;
if (item == "")
count = itemList.length;