Beispiel

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


Lösung
Entfernen Sie den Aufruf von new.
  1. Ersetzen Sie String x = new String( wert ) durch 'String x = wert'

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