Java Help

Chris S

Retired
Messages
2,055
Reaction score
1
Points
38
I need some help with some homework. I have tried and cannot find an answer.

http://sterling.is-a-chef.com:81/java/CardTester.java

is the said code that I am having the problem with. There are no errors being produced. The problem is that it fails on the case statement. The problem i am having is in the public static void card(xxxxx); I need some help if you can offer it.
 

Chris S

Retired
Messages
2,055
Reaction score
1
Points
38
i thought that also, but it doesn't output anything if i use 0
 

YamiKaitou

Member
Messages
636
Reaction score
0
Points
16
You are not allowed to use the == with strings. The == compares primitive data types only. You would have to use s[1].equals("A").
 

Chris S

Retired
Messages
2,055
Reaction score
1
Points
38
thank you so much. I think i might need to ask you for help in a few but... I might not
 
Top