java - I get an identifier expected error. Why? -


why getting identifier expected errors here? separate class main class, used describe rooms have move throughout. but, not know why getting error.

public class describeroom{     protected int roomnum;     public describeroom(roomnum){         this.roomnum = roomnum;     }//end constructor     public string describe(roomnum){         string[] room = {"you find in nicely trimmed front yard. there front door north.",             "you walk southern part of main hall. can't amazed decor.you see front door south, , rooms east , west. there more of hall north.",             "you in northern part of main hall. south rest of hall, , there doors north, west , east.",             "you walk bathroom. smells of lemon. there doors south , east.",             "you walk tidy bedroom. there doors south , east.",             "you walk living room. has couches , sized television. there doors west , south.",             "you walk dining room. has large table in middle candles. there doors west, north, , east.",             "you walk large kitchen. seems large enough house full staff. there door west , north.",             "you walk out onto wooden deck overlooks yard. there door south came.",             "you walk out of house , yard. surrounded fence large climb. there door south came."};         return room[roomnum];     } }//end class 

in method parameter have not set identifier.

use describe(int roomnum)


Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -