View Single Post
  #8 (permalink)  
Old 05-09-2008, 09:09 PM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,022
hardwired is on a distinguished road
"arraySize" is a constant.
Code:
int arraySize = Integer.parseInt(input.trim()); int[] list = new int[arraySize]; for (int i = 0; i < list.length; i++) { list[i] = i+1; } String values = ""; for(int i = 0; i < list.length; i++) { values += list[i]; if(i < list.length-1) values += ", "; if((i + 1) % 40 == 0) values += "\n"; } JOptionPane.showMessageDialog(frame, values + " " +...
Reply With Quote