Guys, I'm a bit surprised not to see any multithreaded strange loops yet. On Thu, Aug 5, 2010 at 10:56 AM, Roel Spilker <[email protected]> wrote:
> Did you use a regular expression on purpose? > > > -----Oorspronkelijk bericht----- > > Van: [email protected] [mailto:[email protected]] > > Namens Kyle Renfro > > Verzonden: 04 August 2010 21:43 > > Aan: The Java Posse > > Onderwerp: [The Java Posse] Re: Post your strangest loop and > > win (up to) 4 free passes to Strange Loop! > > > > Great contest! > > 1 pass required. > > > > Here is a very handy loop that *everyone* should use. ha ha. > > > > import java.io.*; > > import java.util.logging.*; > > > > public class AddTabs { > > > > public static void main(String[] args){ > > > > try { > > BufferedReader in = new BufferedReader(new > > InputStreamReader(System.in)); > > PrintWriter out = new PrintWriter(new > > OutputStreamWriter(System.out)); > > String s = in.readLine(); > > while (s != null){ > > out.println(s.replaceAll(" ", "\t")); > > s = in.readLine(); > > } > > in.close(); > > out.close(); > > } > > catch (IOException ex) { > > > > Logger.getLogger(AddTabs.class.getName()).log(Level.SEVERE, null, ex); > > } > > } > > } > > > > -- > > You received this message because you are subscribed to the > > Google Groups "The Java Posse" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<javaposse%[email protected]> > . > > For more options, visit this group at > > http://groups.google.com/group/javaposse?hl=en. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<javaposse%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > > -- Viktor Klang | "A complex system that works is invariably | found to have evolved from a simple system | that worked." - John Gall Akka - the Actor Kernel: Akkasource.org Twttr: twitter.com/viktorklang -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
