Search:

Type: Posts; User: Norm

Search: Search took 0.22 seconds.

  1. Re: Beginner for Java, need help with this code I wrote

    The forum has an IDE section. Try asking there.
    Java IDEs
  2. Re: Beginner for Java, need help with this code I wrote

    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...
  3. Re: Beginner for Java, need help with this code I wrote

    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...
  4. Re: Beginner for Java, need help with this code I wrote

    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...
  5. Re: Beginner for Java, need help with this code I wrote

    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.
  6. Re: Beginner for Java, need help with this code I wrote

    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...
  7. Re: Beginner for Java, need help with this code I wrote

    Change the value to be one that is allowed, like an int.
  8. Re: Beginner for Java, need help with this code I wrote

    What command are you executing that gets that error message?


    What is the "it" you are talking about? Be more specific than "my PC"
  9. Re: Beginner for Java, need help with this code I wrote

    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...
  10. Re: Beginner for Java, need help with this code I wrote

    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?...
  11. Re: Beginner for Java, need help with this code I wrote

    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!"...
  12. Re: Beginner for Java, need help with this code I wrote

    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...
  13. Re: Beginner for Java, need help with this code I wrote

    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...
  14. Re: Beginner for Java, need help with this code I wrote

    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...
Results 1 to 14 of 14