right i am studying a degree course and i am having trouble with this line of code-
this is my main application and below is the code that will not work correctly-public static void main(String [] args) { Item rent1 = new Item(1000001, "Last Samurai", "Action", 2004, "15", new GregorianCalendar(2010,3,15 ) ); rent1.returnItem(Date_Last_Returned) rent1.display(); } }
rent1.returnItem(Date_Last_Returned)
i am sending this back to this item class-
this line of code is frying my head and i can not see or figure out why it is not working for me, can anyone help please???import java.util.GregorianCalendar; public class Item { private int identifier; private String title; private String genre; private int year_released; private String classification; private GregorianCalendar Date_Last_Returned; private boolean available; public Item(int identifier, String title, String genre, int year_released, String classification, GregorianCalendar Date_Last_Returned) { this.identifier=identifier; this.title=title; this.genre=genre; this.year_released=year_released; this.classification=classification; this.Date_Last_Returned=Date_Last_Returned; } public GregorianCalendar getDate() { return Date_Last_Returned; } public void display() { System.out.println("Here is the identifier- "+identifier); System.out.println("Here is the Date Last Returned- "+Date_Last_Returned.getTime()); } public GregorianCalendar returnItem(GregorianCalendar Date_Last_Returned) { Date_Last_Returned.set(2010, 3,16); available=true; return Date_Last_Returned; } }