X-Received: by 10.50.23.84 with SMTP id k20mr1873074igf.1.1385689551858; Thu, 28 Nov 2013 17:45:51 -0800 (PST) X-Received: by 10.49.101.73 with SMTP id fe9mr1177011qeb.6.1385689551824; Thu, 28 Nov 2013 17:45:51 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!p15no1745212qaj.0!news-out.google.com!p7ni3166qat.0!nntp.google.com!p15no1745209qaj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Thu, 28 Nov 2013 17:45:51 -0800 (PST) In-Reply-To: <2dd11538-00b2-42e0-8ddf-bdb6263478b4@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=90.211.251.153; posting-account=sZfD4AoAAAARhYNuj4BQB7GemP5kMqpa NNTP-Posting-Host: 90.211.251.153 References: <4wTWc.18629$cx.18110@bignews4.bellsouth.net> <2dd11538-00b2-42e0-8ddf-bdb6263478b4@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4dfd478f-58ef-4317-a313-7cddfa16d4b0@googlegroups.com> Subject: Re: PRINTING DIAMOND SHAPE WITH LOOPS! From: pchristor@yahoo.co.uk Injection-Date: Fri, 29 Nov 2013 01:45:51 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.java.programmer:26657 On Wednesday, 27 November 2013 23:57:07 UTC, Lew wrote: > pchr...@yahoo.co.uk wrote: > > > Here is another option: > > > > > > public static void main(String[] args) { > > > > > > int x=9; > > > int m=x/2; > > > StringBuilder str1= new StringBuilder(x); > > > for(int i=0; i > > str1.append("*"); > > > System.out.println(str1.toString()); > > > for(int j=1; j > > if(j<=m){ str1.deleteCharAt(m-j); > > > str1.append("**"); > > > }else{ > > > str1.delete(m,m+2 ); str1.insert(0, " "); > > > } > > > System.out.println(str1.toString()); > > > } > > > } > > > > Seriously, dude? > > > > Start by following the coding conventions, please. > > > > Then we can help with the logic, should we be so bold. > > > > -- > > Lew What coding conventions are not being followed?