Strings, qual a diferenca

2 respostas
D
String s = Hello;

String s2 = Hello;

if (s==s2){

System.out.println(Equal without new operator);

}

String t = new String(Hello);

string u = new String(Hello);

if (t==u){

System.out.println(Equal with new operator);

}

qual diferenca entre esta declaracao String s2 = “Hello”;
e esta String u = new String(“Hello”);

2 Respostas

J

http://www.guj.com.br/posts/list/50044.java

LPJava

boa pergunta eu sempre me atrapalho com isso!!

Criado 18 de janeiro de 2007
Ultima resposta 18 de jan. de 2007
Respostas 2
Participantes 3