Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

method isAvailable

807598May 15 2006 — edited May 15 2006
Hi, i keep getting this error message ';' expected, at the method public boolean isAvailable. I have pasted the java code for my java class below. Can anyone please help?


public class Camera
{
private int id;
// added new attribute called description
private String description;
private int borrower;

// declare other attributes here


public Camera(int newId, String description, int newBorrower)
{
id = newId;
description = description;
borrower = 0;
// edit to set initial values of other attributes; may need further parameters
}

public int getId()
{
return id;
}

public String description()
{
return description;
}

public int getBorrower()
{
return borrower;
}

public boolean isAvailable()
}
if(borrower==0){

return true;
}


public void setDescription()
{
description = description;
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2006
Added on May 15 2006
6 comments
552 views