hi moritz,
du hast den von mir returnierten code gelesen ?
and --> &&
or --> ||
und schon klappts...
mein compiler (1.4 in Eclipse 2.1) ist damit zufrieden 
wenn du noch fragen hast --> pm
greetz
h1

> -----Ursprüngliche Nachricht-----
> Von: Moritz Bellach [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 6. Januar 2005 14:07
> An: talk@pug.org
> Betreff: [PUG] java mal wieder
> 
> 
> es liegt nicht an den konvertierungen. hier der neue 
> quelltext(nicht grade
> schöner zu lesen ich weiß):
> public String getAnswer(HashSet wishwords, int cnt){
>           int count=cnt; //cnt is needed for the standard answers
>           Iterator it=wishwords.iterator();
>           while(it.hasNext() and (aday==0 or aroom==0)){
>               String wishword=(String)it.next(); //get the next word
>               for(day=1; day<366; day++){
>                  if(answers[day-1][0]==wishword){aday=day;}
>                  day++;
>                  }
>                  switch(wishword){
>                        case "single":
>                        case "1":
>                        case "one":
>                         aroom=1;
>                         break;
>                        case "double":
>                        case "2":
>                        case "two":
>                         aroom=2;
>                         break;
>                      }
>               }
>           if(aday!=0 and aroom!=0){
>               if(Integer.parseInt(answers[aday-1][aroom])>0){
>                  
> answers[aday-1][aroom]=Integer.toString(Integer.parseInt(answe
rs[aday-1][aroom])-1);
>                   return "We could book you a room for 
> "+aroom+" persons on
> "+answers[aday-1][0];
>                  }
>               else {return "Unfortunately all rooms on 
> "+answers[aday-1][0]+" for
> "+aroom+" persons are already booked";}
>              }
>           return chStdAnswer(count); //if not understood, 
> return a standard
> answer
>          }
> 
> -- 
> Moritz Bellach
> 
> Baumgartenstr. 36
> 65232 Taunusstein
> 
> +++ GMX - die erste Adresse für Mail, Message, More +++
> 1 GB Mailbox bereits in GMX FreeMail http://www.gmx.net/de/go/mail
> 

----------------------------------------------------------------------------
PUG - Penguin User Group Wiesbaden - http://www.pug.org

Antwort per Email an