private static String annotateMessage(String message, int pos) {
    StringBuilder sb = new StringBuilder(message);
    sb.append('\n');
    for (int i = 0; i < pos; i++) {
      sb.append('-');
    }
    sb.append('^');
    return sb.toString();
  }
private static String annotateMessage(String message, int pos) {
    StringBuilder sb = new StringBuilder(message);
    sb.append('\n');
    for (int i = 0; i < pos; i++) {
      sb.append('-');
    }
    sb.append('^');
    return sb.toString();
  }
private static String annotateMessage ( String message , int pos ) { StringBuilder sb = new StringBuilder ( message ) ; sb . append ( ' ' ) ; for ( int i = 0 ; i < pos ; i ++ ) { sb . append ( ' ' ) ; } sb . append ( ' ' ) ; return sb . toString ( ) ; }
for pretty printing which character had the error
for pretty printing which character had the error