public boolean isNewMessage(){
  if (message == null) {
    throw new IllegalStateException("no message present");
  }
  return message.startsWith("new(") || message.equals("new");
}

public boolean isNewMessage ( ) { if ( message == null ) { throw new IllegalStateException ( "no message present" ) ; } return message . startsWith ( "new(" ) || message . equals ( "new" ) ; }
returns true if the message starts with & quot ; new ( & quot ; or if it equals & quot ; new & quot ;
