here is my code below. i have question regarding my code.why we have taken "output" as string.is this because we have used concate sign in this expression
output+=value+" "; in the code if not plz tell me why??
output+=value+" "; in the code if not plz tell me why??
Code:
int value; String output=""; for(int i=1; i <=10 ; i++) { value= 1+(int)(6* Math.random()); output+=value+""; if(i%2==0){ output+="\n"; } }
Comment