![]() |
Java Exercise Help
I'm working on this Java exercise from one of my Java books. Here's the exercise:
Write a method called isFlush that takes an array of Cards as a parameter and that returns true if the hand contains a flush, and false otherwise. A flush is a poker hand that contains five or more cards of the same suit. Code:
class Card { |
Re: Java Exercise Help
I think I kind of fixed my problem. Here's my code:
Code:
public class Card {java.lang.NoSuchMethodError: main Exception in thread "main" Exception in thread "main" Java Result: 1 I know I have to make my main method static but how can I reference my non static variables from main? Or what other workaround can I use to get this to work? Any help is appreciated. |
Re: Java Exercise Help
I've done some rearranging but still can't get the program working. Here's my code:
Code:
public class Main { |
Re: Java Exercise Help
Problem Solved!
|
| All times are GMT +5.5. The time now is 20:30. |