🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #17337

Pregunta tonta

#17337
From: miguel�n
Date: Mon, 20 Nov 2000 02:54
34 lines
1895 bytes
Soy un verdadero novato y me estoy volviendo loco intentando encontrar el
fallo:

1- Esto funciona

class Mates {
    public static void main( String args[] ) {
        int contador=1;

        while (contador<=10){
            System.out.println("contador vale "+contador);
            contador++;
            }
        }
    }

y me imprime de 1 al 10 enn pantalla

2- �Porqu� esto no?

class Mates2 {
        public static void main( String args[] ) {
              int contador;

              for (contador=1;contador==10;contador++){
              System.out.println("contador vale "+contador);
              }
       }
}

�D�nde est� el fallo? No da problemas de compilaci�n, pero luego lo ejecutas
y no sale nada, vuelve a salir el prompt y ya est�.

Ceppas
Technical Details
Message-ID: <on0S5.64255$Z7.688090@telenews.teleline.es>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newspeer.clara.net!news.clara.net!news-hub.cableinet.net!btnet-peer!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!newsfeed.mad.ttd.net!telenews.teleline.es!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,1ebc6e70e38a8a59,start
X-Google-Attributes: gid1116f3,public
X-Google-ArrivalTime: 2000-11-19 18:51:15 PST
From: "miguel�n" <ceppas@teleline.es>
Newsgroups: es.comp.lenguajes.java
Subject: Pregunta tonta
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <on0S5.64255$Z7.688090@telenews.teleline.es>
Date: Mon, 20 Nov 2000 02:54:12 GMT
NNTP-Posting-Host: 193.153.150.254
X-Complaints-To: newsmaster@company.com
X-Trace: telenews.teleline.es 974688852 193.153.150.254 (Mon, 20 Nov 2000 03:54:12 MET)
NNTP-Posting-Date: Mon, 20 Nov 2000 03:54:12 MET
Organization: Typhoon Authentication Testing Club
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!newspeer.clara.net!news.clara.net!news-hub.cableinet.net!btnet-peer!btnet!newsfeed.bt.es!195.5.65.34.MISMATCH!caladan.arrakis.es!newsfeed.mad.ttd.net!telenews.teleline.es!not-for-mail