Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37052
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Andreas Leitgeb <avl@logic.at> |
| 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 | <slrnoo6aad.o2q.avl@logic.at> (permalink) |
| References | <exercise-20170803112636@ram.dialup.fu-berlin.de> |
| 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 |
Show key headers only | View raw
Stefan Ram <ram@zedat.fu-berlin.de> 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 ;-)
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
Re: A small challenge at beginner's level Andreas Leitgeb <avl@logic.at> - 2017-08-03 13:42 +0000
Re: A small challenge at beginner's level Andreas Leitgeb <avl@logic.at> - 2017-08-03 14:02 +0000
Re: A small challenge at beginner's level Martin Gregorie <martin@address-in-sig.invalid> - 2017-08-03 22:47 +0000
Re: A small challenge at beginner's level Eric Douglas <e.d.programmer@gmail.com> - 2017-08-08 08:01 -0700
Re: A small challenge at beginner's level Sebastian <nowhere@nirvana.org> - 2017-08-08 22:59 +0200
Re: A small challenge at beginner's level Eric Douglas <e.d.programmer@gmail.com> - 2017-08-09 05:16 -0700
Re: A small challenge at beginner's level Arne Vajhøj <arne@vajhoej.dk> - 2017-08-08 21:00 -0400
csiph-web