🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8233

Re: Very simple question about date

#8233
From: Torsten Welches
Date: Mon, 16 Apr 2001 10:06
30 lines
1644 bytes
Russel,

you can't combine your two for-loops into one for-loop because you have two
different end conditions.
The syntax to combine them would be something like that:

for (int i = start, j = 1; i < 31 && j < end; i++, j++) { //not what you
want, neither is OR
  ...
}

This will compile but is clearly not what you want. You need to check for
two distinct conditions so you need two for-loops.

Torsten


Russell schrieb in Nachricht <3ADA8885.92151876@cesma.com.sg>...
>     // month april
>     for(int i = start ; i < 31 ; i++){
>      System.out.println("i " + i);
>     }
>
>     // month may
>     for(int j = 1 ; j < end ; j++){
>       System.out.println("j" + j);
>     }
>
>   I want to combine the two "for" loops into one loops only , anybody
>have any ideas ?? Thanks.
Technical Details
Message-ID: <3adac388$1_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3ADA8885.92151876@cesma.com.sg>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,6cf9ff513c886017
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-04-16 03:17:49 PST
From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Newsgroups: borland.public.jbuilder.java.language
References: <3ADA8885.92151876@cesma.com.sg>
Subject: Re: Very simple question about date
Date: Mon, 16 Apr 2001 12:06:28 +0200
Lines: 32
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 213.168.73.138
Message-ID: <3adac388$1_2@dnews>
X-Trace: dnews 987415432 213.168.73.138 (16 Apr 2001 03:03:52 -0700)
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews