In this program for blackjack in my card class, it says illegal star.docx - In this program for blackjack in my card class it says illegal start of

In this program for blackjack in my card class, it says illegal star.docx

This preview shows page 1 - 4 out of 9 pages.

Image of page 1
In this program for blackjack in my card class, it says illegal start of expression, how do I fix it? /*BLACKJACK CLASS*/ import java.util.Random; import java.util.Scanner; public class Blackjack { String type; int currentcard; int total = 0; //total in hand static int dealerTotal = 0; //dealer's total static int playerTotal = 0; //player's total, static variables allow totals to be compared at the end Random ran = new Random(); Scanner sc = new Scanner(System.in); //to input whether player wants to hit or stay public Blackjack(String player) { type = player; //whether it's dealer or player //System.out.println("Welcome to Blackjack!"); �� Deal(); game(); �� } void displayCard()
Image of page 2
{ Card potato = new Card(); //calls from card class int currentcard = potato.drawCard(); String suit = potato.getSuit(); while(currentcard == 0) { currentcard = potato.drawCard(); //draws cards } switch(currentcard) { //cases 11, 12, 13 = user drew a J, Q, or K case 11: System.out.println(" Jack " + suit); total = total + 10; System.out.println(type + " Current total: " + total); //adds to total score
Image of page 3
Image of page 4

You've reached the end of your free preview.

Want to read all 9 pages?

  • Fall '19
  • Playing card, Spades, currentcard

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture