Przykład

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


Rozwiązanie
Usuń wywołanie metody new.
  1. Zastąp wywołanie String x = new String( wartość ) kodem String x = wartość.

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