Příklad

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


Řešení
Odeberte volání new.
  1. Nahraďte volání String x = new String( value ) voláním "String x = value".

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