Search:

Type: Posts; User: Norm

Search: Search took 0.25 seconds.

  1. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    A type is the name of a class or a primitive like int. By convention class names should start with uppercase letters.
    You are using the symbol: name where there should be the name of a class. For...
  2. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    Can you post the full text of the compiler's error messages?
  3. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    The javac command must be able to find definitions for the classes that you use in a java source file when it is compiling that source file. The definition files for the classes should be on the...
  4. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    open a command prompt window, use the change directory (CD) command to change to the directory with the source file: (.java) and enter the command:
    javac <THESOURCEFILENAMEHERE>.java

    If the javac...
  5. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    Sorry I can not see the 'x's from your IDE (not compiler)
    Use the javac command to get the compiler error messages.
  6. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    Those are not compiler error messages. They are generated by the IDE. Those messages are missing a lot of information about the errors. The IDE must give you some visual indication of the error in...
  7. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    That sounds like a compiler error. Please copy and paste here the full text of the error messages.
  8. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    You create an instance of a class by using a new statement:
    new TheClassName();

    What do you want or expect the class to do when you execute it?
  9. Replies
    20
    Views
    2,986

    Re: Question about creating and using classes.

    To make a program from a class, add a main() method to it. The main() method will have to create an instance of the class and call its methods as needed.

    Please Edit your post and wrap your code...
Results 1 to 9 of 9