The forum has an IDE section. Try asking there.
Java IDEs
Type: Posts; User: Norm
The forum has an IDE section. Try asking there.
Java IDEs
Here is an example of the use of the java command with the wrong classname and the right one:
Microsoft Windows XP [Version 5.1.2600]
D:\JavaDevelopment\Testing\ForumQuestions8>java...
Your IDE is executing the java command with a classname. It builds a commandline:
java <classnamehere>
The contents of the error message makes it look like the classname being used is: Cards$Suits...
I was asking how you do run it. Not if you were to .....
What commandline is executed that gives you the error message? Your IDE is creating and using a commandline to execute the code. What is in...
What is the commandline that is being executed when you "run" the code?
Normally the commandline would be: java <classname>
For you the <classname> would be Cards.
The switch statement will work with an int.
You need to write an expression that is an int value.
Try defining an int variable and assigning it a value from the expression you are using and then...
Change the value to be one that is allowed, like an int.
What command are you executing that gets that error message?
What is the "it" you are talking about? Be more specific than "my PC"
You forget to answer these two questions:
What command are you executing that gets that error message?
What class file was involved?
You're posting an error message but I have no idea what you...
That means: The M(???)/main method was not found in the class Cards$Suits.
It seems pretty clear to me.
What command are you executing that gets that error message?
What class file was involved?...
Yes. There is no default clause. The compiler doesn't know what the switch() value will be.
You need to read the tutorial about how to write and execute a java program:
Lesson: The "Hello World!"...
Please edit your post and add cod tags. See:
BB Code List - Java Programming Forums - The Java Community
You need to read the doc for how to use a switch statement and how to code default.
It...
Have you written a small test program to see what the compiler thinks of your code?
If it compiles then execute it and see what it does.
When you get errors you don't understand
or have code that...
Can you explain your problem.
If you are getting errors, copy and paste them here.
If the output is wrong, copy and paste it here and explain what is wrong with it.
To copy the contents of the...