Példa
public
static
void
main(
String
[] args ){
String
str =
new
String(
"Example"
);
//$NON-NLS-1$
System.out.println( str );
}
Megoldás
Ne használja a
new
utasítást
Az 'x = new String( value )' helyett a 'String x = value' kifejezést használja
public
static
void
main(
String
[] args ){
String
str =
"Example"
;
//$NON-NLS-1$
System.out.println( str );
}