[Solved] Concatenate multiple variables in java [closed]


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

solved Concatenate multiple variables in java [closed]