Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

StdIn StdOut

807601Apr 25 2008 — edited Apr 26 2008
Can someoone tell me if the syntax is correct for my StdIn statement? I want to use it to drive the while loop below. The StdIn statement needs two values Hit or Stand (See StdOut statement. Thanks.
 public static String[] player(String[] deck) {

    StdOut.println("Hit or Stand?");

    String status = StdIn.readString("Hit";"Stand");
    int playersHand = 0;
   String[] player = new String[playersHand];
   
    while(status == Hit){
    for(int card=0; card<deck.length; card++) {

	}
    }
}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 24 2008
Added on Apr 25 2008
18 comments
406 views