Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

object arrays

  Asked By: Joel    Date: Oct 18    Category: Java    Views: 521

I'm getting a bunch of errors like this:

$ javac LotDatabase.java
LotDatabase.java:76: cannot resolve symbol
symbol : constructor ParkingSpace (int,int,int,int,boolean)
location: class ParkingSpace
spaces [j] = new ParkingSpace(i, j, 0, GENERAL, true);

Code is this:
ParkingSpace[] [] spaces = new ParkingSpace[1] [12];
spaces [j] = new ParkingSpace(i, j, 0, GENERAL, true);

Here's the constructor in the ParkingSpace class:
public ParkingSpace(int lotNo, int spaceNo, int floorNo, int spaceType, Boolean
parkingLotNumber = lotNo;
spaceNumber = spaceNo;
floorNumber = floorNo;
type = spaceType;
spaceAvailable = available;



5 Answers Found

Answer #1    Answered By: Horia Ahmed     Answered On: Oct 18

How about removing the access modifier "public" from the front
of ParkingSpace constructor  and try to recompile.

Answer #2    Answered By: Sophie Williamson     Answered On: Oct 18

Make the b in boolean lowercase. Boolean (B) is an object, and
boolean (b) is a boolean. Make the heading read
public ParkingSpace(int lotNo, int  spaceNo, int floorNo, int
spaceType, boolean available)

Answer #3    Answered By: Hattie Howard     Answered On: Oct 18

please send me the answer to my question. "What is the difference between
<jsp:forward> and jsp:sendRedirect() method.?" Please give answer to this
question asap.

Answer #4    Answered By: Adanalie Garcia     Answered On: Oct 18
Answer #5    Answered By: Ginger Snyder     Answered On: Oct 18

Jsp:forward will execute on client side. sendredirect will execute on
Server side

Didn't find what you were looking for? Find more on object arrays Or get search suggestion and latest updates.