Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
| Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2008, 02:13 PM
Authorized User
 
Join Date: Apr 2008
Location: newcastle upon tyne, tyne and wear, United Kingdom.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error while testing the class tester

Hi Guys,
I get the following error when I compile my code:

Below is the error when I compile


symbol : constructor Course(java.lang.String)
location: class Course
Course hoursperweek1 = new Course("21");
C:\Course\src\CourseTest.java:18: cannot find symbol
symbol : constructor Course(java.lang.String)
location: class Course
Course duration1 = new Course("1 Year");
6 errors
BUILD FAILED (total time: 1 second)

 
Old February 11th, 2009, 08:21 AM
Registered User
 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It would be very useful for us if you post your code, also please use code tag while posting it.

According to your error i can assume following possibilities..

A) you did not defined constructor of a class which takes String as a argument.

B) you defined one method which has same name as a class but do not follow signature of constructor. It should be like as follows

Code:
public Course(String args)
{
}
 
Old February 12th, 2009, 06:36 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Is there a reason you are answering posts that are many months old??

I doubt seriously that the original posters are going to come back and see your answers.

(I also think the original poster in this case was in a lot deeper trouble than you suggest.)
 
Old February 12th, 2009, 11:24 PM
jomet
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Old Pedant View Post

I doubt seriously that the original posters are going to come back and see your answers.
Any way the orginal poster will get a email regarding this update.
 
Old February 13th, 2009, 01:49 AM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Not unless he subscribes to post responses. I don't. I don't get emails about responses to my posts.

I don't remember what the default is in this forum. I know on most the default is no subscription. But maybe in this forum the default is "subscribe."
 
Old February 13th, 2009, 02:07 AM
Registered User
 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Talking

Thanks to remind me !!! while i was posting the answer , I completley forgot to check the date of submission of the query but as jomet said he should get the email. By default user gets mail regarding there post replies.




Similar Threads
Thread Thread Starter Forum Replies Last Post
ThemeSelector class error xrica32 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 August 14th, 2007 08:20 PM
Using class reference getting error rojiin ASP.NET 2.0 Basics 2 July 6th, 2007 01:53 PM
error ... when calling a class HumaMunir Java Espanol 2 May 7th, 2005 01:09 PM
HTTP_REFERER Tester Sometimes Redirects OK Visitor markw707 Classic ASP Basics 4 August 21st, 2003 11:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.