Thanks.
-Silent
Type: Posts; User: SilentNite17
Thanks.
-Silent
Hmmm.......
Alright, I just don't know who to ask.
Oh....
Well, it was already defined as Cards, see:
public class Cards {
enum Suits { Club, Diamond, Spade, Heart }
Really, I'm sorry, I don't know what your talking about.
All I do when I run the program in Elipse to check to see if there are any errors is I click the run button.
Hmmmmmm.......
Can...
If I ran it in the console (cmd), it would be javac to compile and java to run it. If I run it in Eclipse, I suppose i just click the run button.
Is this what you've been asking?
Thank you, Norm, that solved the switch problem, but when I run the code in Eclipse, it still gives the main() error.
Yes, I tried that. When I switch the (double) to an (int), then it says the same thing and when I switch it to a string it says
The operator * is undefined for the argument type(s) String, double...
Ok, thanks, that solved the default problem, but now we still have the same error as before and a new problem earlier in the switch:
switch ( (double) 3*Math.random() ) {
The (double)...
Yes, that's what 've been saying.
The problem is that's all it says. All it tells me is that error code.
Also, it gets an error with the case default in the switch.
I have the feeling we...
Alright, here:
public class Cards {
enum Suits { Club, Diamond, Spade, Heart }
public static void main(String[] args) {
String userInp;
Ummm.......
Why? I already know how to write AND execute a program. I have written quite a few, even. That work.
If you could elaborate on what SPECIFICALLY the computer means by
Error:...
Alright......
When I was reading the doc, the sample problem was this:
String computerMove;
switch ( (int)(3*Math.random()) ) {
case 0:
computerMove = "Rock";
break;
case...
OK, new problem with same (or similair) code.
I re wrote the code in my previous post with the java.util.Scanner, and here is what it looks like:
import java.util.Scanner;
public class...
Sorry, Norm. Thank you form reminding me.
Disregard the part about input, I have learned how to use a Scanner now. The errors that I am getting are things like "cannot convert to double" or...
Hey,
I'm new to Java and this forum. I have been reading the online book JavaNotes to learn Java, and I wrote this code. I couldn't figure out what was wrong with it using the book, except for...