public static String topLevelTypeString(String typeStr){
  int dollarIndex=typeStr.indexOf('$');
  String topLevelTypeStr=dollarIndex == -1 ? typeStr : typeStr.substring(0,dollarIndex);
  return topLevelTypeStr;
}

public static String topLevelTypeString ( String typeStr ) { int dollarIndex = typeStr . indexOf ( '$' ) ; String topLevelTypeStr = dollarIndex == - 1 ? typeStr : typeStr . substring ( 0 , dollarIndex ) ; return topLevelTypeStr ; }
given the name of a class c , returns the name of the top - most enclosing class of class c . for example , given a $ b $ c , the method returns a
