🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: be.comp.programming
4 messages
4 total messages Started by Christian R Sat, 13 Mar 2004 15:20
do while + java
#2728
Author: Christian R
Date: Sat, 13 Mar 2004 15:20
8 lines
1123 bytes
Hallo,

Een klein Java vraagje aub.
Bestaat er een Do While instructie in Java?
Zo niet, door wat kan dit dan het best vervangen worden?
Alvast bedankt,

Christian.
Re: do while + java
#2730
Author: Koen Hautekeete
Date: Sat, 13 Mar 2004 15:55
18 lines
1413 bytes
Christian R wrote:
> Hallo,
> 
> Een klein Java vraagje aub.
> Bestaat er een Do While instructie in Java?

Eenvoudig voorbeeld:

int i = 0;
do {
	System.out.println("test " + i);
         i++;
}
while (i < 10);

Mvg

Koen
Re: do while + java
#2732
Author: Kristoffel
Date: Sat, 13 Mar 2004 15:58
21 lines
1535 bytes
Christian R wrote:
> Hallo,
> 
> Een klein Java vraagje aub.
> Bestaat er een Do While instructie in Java?
> Zo niet, door wat kan dit dan het best vervangen worden?
> Alvast bedankt,
> 
> Christian.
> 
> 

class DoWhile {
	public static void main (String[] args) {
		int i = 1;
		do {
			System.out.println ("lijn nr.: " + i);
		} while (i++ <= 5);
		System.exit (0);
	}
}
Re: do while + java
#2734
Author: Christian R
Date: Sat, 13 Mar 2004 22:10
27 lines
1629 bytes
Bedankt iedereen,
Christian.


"Kristoffel" <knospam@yahoo.com> schreef in bericht
news:icG4c.33185$881.2240567@phobos.telenet-ops.be...
> Christian R wrote:
> > Hallo,
> >
> > Een klein Java vraagje aub.
> > Bestaat er een Do While instructie in Java?
> > Zo niet, door wat kan dit dan het best vervangen worden?
> > Alvast bedankt,
> >
> > Christian.
> >
> >
>
> class DoWhile {
> public static void main (String[] args) {
> int i = 1;
> do {
> System.out.println ("lijn nr.: " + i);
> } while (i++ <= 5);
> System.exit (0);
> }
> }
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads