Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

A lil help!

2»

Comments

  • Registered Users, Registered Users 2 Posts: 885 ✭✭✭clearz


    You could remove the use of a string or StringBuffer altogether and only use characters.
        public static void main(String[] args)
        {
            for ( int i=0,t=1;i<=10;System.out.print((++i % t != 0) ? '*' : '\n'))
                if(i % t == 0){i=0;t++;}
        }
    


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    GreeBo wrote:
    Is it smart enough to catch looped substring calls?
    If it is thats impressive.

    I would have thought so. I'm not really sufficiently interested to poke around with a disassembler tho :)


Advertisement