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, 05:36 AMezeeHow to prevent sum of variables inside sysoutCode:
`System.out.println(a2[0] + a2[1] + a2[2]);`

- 10-30-2011, 05: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]);`