Hello,
I have a
Java assignment that has me constructing a program to manage a Timetable (school timetable).
In one of the classes I have to create two methods that are identical to two other methods in another class of this program.
Here is the code:
Now I get the error "Cannot make a static reference to the non-static method getDurationString(DateTime) from the type DateTime".
How is it caused? and is it possible to solve the issue WITHOUT making the method in the other class static?
Below is the code of the original methods:
As you can Understand I dont want to be redundant and copy the whole thing into the other class.