Re: How do I get this to output 12 strings per line



Louie LaRue wrote:
This is a program that randomizies the strings in the array 20 times
and outputs them in a single line. How do I make it output 12 strings
per line?
for (int i=0; i<result.length; i++)
System.out.print (result[i]);

At this point I'd insert a statement involving i, 12, the modulo function and the println() method.


}
}
.



Relevant Pages

  • Re: Help with regular expression?
    ... I take it you mean all String literals, not all strings. ... Character classes don't work for character sequences like that, ... calls println() on the alias. ... problem is one of the original reasons for regular expressions, ...
    (comp.lang.java.programmer)
  • Re: max internal length of String
    ... how the output is used it is hard to tell exactly how many [println a ... Strings are just charinternally. ... on a 32 bit JVM you will run out of RAM first. ... I suggest you pepper your code with asserts or prints of the string ...
    (comp.lang.java.programmer)
  • Re: "Interleave" permutation algorithm?
    ... n being the length of the sequence. ... This is a neater version. ... this interpreted code interleaved one million short strings in a fraction of a second. ... println "Interleaved = ",a ...
    (comp.programming)