public class LocalCall extends PhoneCall {
CheckedTime startTime;
CheckedTime endTime;
public LocalCall(CheckedTime startTime, CheckedTime endTime) {
super(startTime,...
Type: Posts; User: Junky
public class LocalCall extends PhoneCall {
CheckedTime startTime;
CheckedTime endTime;
public LocalCall(CheckedTime startTime, CheckedTime endTime) {
super(startTime,...
OK and somewhere in the toString of the LocalCall class you are using a variable that is null. Did you do what I suggested and add a bunch of print statements to find out which variable is null?
Are you saying that LocalCall class extends the abstract class and does not provide its own toString method, thus it uses the toString method in the abstract class?
Either way what you need to do...
Hello McFly are you listening?
Exception in thread "main" java.lang.NullPointerException
at LocalCall.toString(LocalCall.java:58)
The error is occuring on line 58 in your LocalCall class. All...
Copy and paste the full and exact error message. Also indicate on which line the error occurs.
Where do you get startTime and endTime variables from?
This isn't really necessary as Scanner will throw a FileNotFoundException if the file doesn't exist.
if (callType == "D" || callType == "L") {
You rarely want to use == to compare objects....