This will add, how to restrict them to perform sum operation.Code:`System.out.println(a2[0] + a2[1] + a2[2]);`

Printable View

- 10-30-2011, 04:36 AMezeeHow to prevent sum of variables inside sysoutCode:
`System.out.println(a2[0] + a2[1] + a2[2]);`

- 10-30-2011, 04:38 AMFubarableRe: How to prevent sum of variables inside sysout
Do you want to display them as a String? If so, a shorthand way to do this is to make an empty String the first part of the println parameter:

Code:`System.out.println("" + a2[0] + a2[1] + a2[2]);`