I have this method inside a class that extends an abstract class. This is a two part problem.
PART 1: my toString method is loaded with errors below. I have imported java.util.* already. I've obviously missed one thing that is causing the whole method to give me an error. This same class is copied from an abstract class I created. Should my abstract contain less info and could that be causing the error?
LongDistanceCall.java:45: class, interface, or enum expected
public String toString() {
^
LongDistanceCall.java:49: class, interface, or enum expected
String startTimeOutput = startTime.toString(startTime); //send PreciseTime objects to 'toString()'
^
LongDistanceCall.java:50: class, interface, or enum expected
String endTimeOutput = endTime.toString(endTime);
^
LongDistanceCall.java:52: class, interface, or enum expected
costOutput += this.computeCost();
^
PART 2: My class extend and abstract class. I cant determine what I'm supposed to put in my abstract class to help define my class constructor. Here's my class constructor. Should it just be blank, since I have to classes that implement the abstract?
public class MyConstuctor extends AnAbstractClass {
protected object o;
protected object o2;
public myConstructor(Object o, Object o2 ) {
this.o = o;
this.o2 = o2;
} //end constructor
}
Thanks in advance for your help.