hello, real basic question:
If you declare a member variable within a class, will the compiler generate an error if i don't initialize them? Another question: Do I need to declare my constructor parameters as member variables as shown below?
for example:
public class Car
{
private Date date;
private
String make;
private String model;
public Car(Date date, String make, String model)
{
this.date = date;
this.make = make;
this.model = model;
}
public double someMethod()
{
...some code that doesn't use or initialize any of the above
member variables...
return 0;
}
}
Thanks in advance for the help,
JohnCP