Question: I am getting a SyntaxError: Unexpected identifier 'getcard 1 ' My code on top with the instructions on the bottom,Exercise 1 . 1 : First

I am getting a SyntaxError: Unexpected identifier 'getcard1'
My code on top with the instructions on the bottom,Exercise 1.1: First Class
A class contains variables and methods, for the class PlayingCard do just 3 things:
Declare a private integer variable named cardl
Write a public method named getcardl that returns the value of the global variable
Write a public method named setcardl that has one parameter, and changes the value of the global variable
You do not have to declare a PlayingCard variable, create an object or call the methods, I will do that.
Help:
Exercise 1.1: First Class
A class contains variables and methods, for the class PlayingCard do just 3 things:
Declare a private integer variable named cardl
Write a public method named getcardl that returns the value of the global variable
Write a public method named setcardl that has one parameter, and changes the value of the global variable
You do not have to declare a PlayingCard variable, create an object or call the methods, I will do that.
Help:
Incorrect method names will cause this exercise to failIncorrect method names will cause this exercise to fail in Java
 I am getting a SyntaxError: Unexpected identifier 'getcard1' My code on

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!