I would also recommend using a Map<String, Contact>
, but just in case you don't want to do that, here is how to do it with your code:
System.out.println("Please enter ID of contact: ");
String soughtId = input.nextLine();
for (Contact showcontact: contacts)
{
if (showcontact.getContactId().equals(soughtId))
System.out.println(showcontact.displayContact());
}