Dan Knight

Greenhorn
+ Follow
since Feb 17, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dan Knight

Hey guys,

Thanks for the responses.

It doesn't give me anymore information other than "Error: cannot find symbol". It compiles OK so I don't understand what the problem is. When trying to create a new customer object, though, I enter some nonsensical data to fill the fields and then it tells me there's an error.

Frustrating! Discouraging! Possible cause for baldness, either stress-related or due to taking aggression out on it!

* * * * * * * * * * * * * * *
Edit:
* * * * * * * * * * * * * * *

Wow. Big wow. Really big wow.

The problem was that I didn't use speech marks when trying to assign value to my variables. I don't know whether that's just a BlueJ thing but in any case, I shall never visit this site again out of sheer embarassment of immense stupidity!
[ February 17, 2006: Message edited by: Dan Knight ]
18 years ago
A few years ago at college, I had to develop a simple database in Java. Out of the blue, I decided to have another go (from scratch) but I've fell at the first hurdle. I use BlueJ for developing. The class compiles without any problems but when I come to create an object, I'm told "Error: cannot find symbol". I thought the code was practically idenitical to what worked at college but here goes...

Class: Customers

public class Customers
{
// instance variables - replace the example below with your own
public String customerID;
private String title;
private String firstName;
private String surname;
private String date;
private String initials;
private String department;
private String addressOne;
private String addressTwo;
private String city;
private String county;
private String postcode;
private String country;
private String telephone;
private String extension;
private String fax;
private String mobile;
private String email;
private String website;
private String history;
private String notes;

/**
* Constructor for objects of class Customers
*/
public Customers(String cTitle, String cFirstName, String cSurname, String cDate, String cInitials, String cDepartment,
String cAddressOne,String cAddressTwo, String cCity, String cCounty, String cPostcode, String cCountry, String cTelephone,
String cExtension, String cFax, String cMobile, String cEmail, String cWebsite, String cHistory, String cNotes)
{
// pass data into previous variables
title = cTitle;
firstName = cFirstName;
surname = cSurname;
date = cDate;
initials = cInitials;
department = cDepartment;
addressOne = cAddressOne;
addressTwo = cAddressTwo;
city = cCity;
county = cCounty;
postcode = cPostcode;
country = cCountry;
telephone = cTelephone;
extension = cExtension;
fax = cFax;
mobile = cMobile;
email = cEmail;
website = cWebsite;
history = cHistory;
notes = cNotes;

}
}

Thanks in advance!
18 years ago