faqts : Computers : Programming : Languages : Java

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

12 of 32 people (38%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

Java: Class: Inheritance: Constructor: Error: Cannot resolve symbol [void]

Sep 29th, 2003 09:05
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 29 September 2003 - 17:58 - 06:02 pm ----------

Java: Class: Inheritance: Constructor: Error: Cannot resolve symbol 
[void]

One of the possible causes:

do not use the word 'void' in front of the constructor name.

---

e.g. when you run your Java program, you get an error
similar to the following:

cannot resolve symbol

symbol  : constructor addressC (java.lang.String)

location: class addressC
        addressC knudO = new addressC( "myname" );
                         ^

---

e.g.

  public void myconstructor() {
  };

will give this error.

---

but, after removing the word 'void',
the following will not give an error
message:

  public myconstructor() {
  };

----------------------------------------------------------------------