You need to add a +
before each value you add, so a +
after raza
(not just before), peso
and so on.
Thats how string concatenation works in Java.
Like this:
System.out.println ("El Peso de la" + raza + "es de " + peso + "kg y se alimenta de " + alimeto);
See
- How do I concatenate two strings in Java?
- http://docs.oracle.com/javase/7/docs/api/java/lang/String.html
solved Concatenate multiple variables in java [closed]