示例

public static void main(String[] args){
String str = new String("Example"); //$NON-NLS-1$
System.out.println( str );
}


解决方案
除去对 new 的调用
  1. 将 String x = new String( value ) 调用替换为“String x = value”

public static void main(String[] args){
String str = "Example"; //$NON-NLS-1$
System.out.println( str );
}