GregorianCalander
Posted
by namitjain23
on Stack Overflow
See other posts from Stack Overflow
or by namitjain23
Published on 2010-04-25T19:55:09Z
Indexed on
2010/04/25
20:13 UTC
Read the original article
Hit count: 120
java
|gregorian-calendar
Hey guys, i know this is a very simple question but i am new to Java so please bare with me. I have create a program that can calculate the time a book is due to come back after being issed! So please help me out Here is the piece of code that i have:
public void loan(int numOfDays) {
if( onLoan == true) {
System.out.println("Already on Loan, Return Date : "+Calendar.DATE );
}
else {
due.set( numOfDays, Calendar.DATE );
System.out.println("Available");
onLoan = true;
} }
// Mark the book as having been returned
Basically i need to replace that Calendar.DATE to get me calculations right. I need to calculate the date passed by the TEST file and calulate the date it will be returned. This project needs to be submitted TOMORROW, so please please help me out!
© Stack Overflow or respective owner