![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
11/07/2011, 03:12
|
![Avatar de HKdrott](http://static.forosdelweb.com/customavatars/avatar67368_0.gif) | | | Fecha de Ingreso: junio-2004
Mensajes: 127
Antigüedad: 20 años, 8 meses Puntos: 0 | |
Duda Java básico Hola,
tengo una duda de programación :
public static String listadoProductos() {
String s = "";
for(int i=0; i<productos.size(); i++) s += (i+1) +". " + productos.get(i) + "\n";
return s;
}
Me gustaría saber por qué hay en la variable tipo string s, un + = .... , mi duda es por qué un + = .
Un saludo |