Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Andreas Leitgeb Newsgroups: comp.lang.java.programmer Subject: Re: A small challenge at beginner's level Date: Thu, 3 Aug 2017 13:42:46 -0000 (UTC) Organization: A noiseless patient Spider Lines: 18 Message-ID: References: Reply-To: avl@logic.at Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 3 Aug 2017 13:42:46 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="3372b44961abf9e24369633da1e6adcb"; logging-data="9393"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yQmK8/qwExxrNOyo0bBVn" User-Agent: slrn/1.0.2 (Linux) Cancel-Lock: sha1:WSBZBGXl3UOsqkGg8rzdZUfcp7E= Xref: csiph.com comp.lang.java.programmer:37052 Stefan Ram wrote: > public final class Main > { public static void main( final java.lang.String[] args ) > { java.lang.System.out.println( ... ); }} > > where an expression can be inserted replacing > the »...«. Is it also allowed to fix the atrocious formatting? > and in between you may use literals of the types double, int > and String, the operators »+«, »-«, »*« and »/« and > parentheses »(...)« and method calls of static methods of > the Java SE standard library. String.format("you have%5.5s.",String.format("%"+(1+4*Math.round(Math.random()))+".1s"," lost")+"won") certainly newbie level ;-)