Results 1 to 3 of 3
  1. #1
    ireland94 is offline Member
    Join Date
    Apr 2013
    Location
    Dallas, Texas, USA
    Posts
    2
    Rep Power
    0

    Default Compiler error on constructor for thread class

    I am using
    Windows 7/64
    NetBeans 7.2

    I am getting a IDE identified coding error message of

    "invalid method declaration; return type required" on the public SAGESplashScreen () constructor.

    I need the constructor as I will be passing in arguments to the class to be used by the thread.

    I have reduced the code to the minimum that shows the error so as to not cloud the issue.

    I have no other SAGESplashScreeen class in my classpath.

    This code is based on several examples that I have found on the internet.

    It is my opinion that there is an issue with NetBeans (not neccessarily that NetBeans is broken rather I am not using it correctly).

    I have examined the properties for both the project and file but find not option in NetBeans that needs to be set to specify multithreaded program development.

    package sage;
    public class SAGESplashScreeen implements Runnable
    {
    public SAGESplashScreen ()
    {
    } // public SAGESplashScreen ()

    @Override
    public void run()
    {
    } // public void run()
    } // public class SAGESplashScreeen implements Runnable
    Last edited by ireland94; 05-09-2013 at 06:07 PM. Reason: spelling correction

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,009
    Rep Power
    20

    Default Re: Compiler error on constructor for thread class

    Your class is called SAGESplashScreeen.
    Your constructor is called SAGESplashScreen.
    Count the "e"'s.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    ireland94 is offline Member
    Join Date
    Apr 2013
    Location
    Dallas, Texas, USA
    Posts
    2
    Rep Power
    0

    Default Re: Compiler error on constructor for thread class

    Thank you so much for the other set of eyes.

    So much for my JAVA Cert and programming in JAVA off and on over 15 years.

    Anybody can read something yet not read it.

Similar Threads

  1. compiler error Array of a custom class
    By lenois in forum New To Java
    Replies: 10
    Last Post: 03-10-2013, 04:52 PM
  2. Replies: 3
    Last Post: 10-01-2011, 09:29 PM
  3. Default constructor by compiler.
    By manishdivs in forum New To Java
    Replies: 2
    Last Post: 09-19-2011, 05:31 PM
  4. Replies: 3
    Last Post: 01-23-2009, 08:53 AM
  5. Replies: 0
    Last Post: 12-19-2007, 09:10 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •