Hi,
I'm currently writing a number of classes to handle video loans etc. The current class, called 'Loans', handles simple information about a loan of a video to a borrower.
My question is simply how do I add the date and time to this class so it is represented with the loan information for a borrower?
My code for this class is currently as follows,
Basically, when I call the toString method I need to be able to print out the date and time as well. Any help really appreciated!!Code:package videos; import simplejava.*; public class Loan { private Borrower borrower; private Video video; public Loan() { this.video = video; this.borrower = borrower; } public String toString() { return video + "" + borrower; } }![]()


Reply With Quote


Bookmarks