![]() |
simple problem - code wont compile
:
public class Hotel {it says a ";" is expected and highlights the following: :
private static int freeRooms=number of rooms available in the hotel;any help would be appreciated. |
Re: simple problem - code wont compile
My knowledge of Java is somewhat minimal, but you are trying to assign a value of "number of free rooms available in the hotel" to an int?
|
Re: simple problem - code wont compile
Yeah, I think your assignment expected you to replace "number of free rooms available in the hotel" with an actual number. ;)
|
Re: simple problem - code wont compile
youn need to read the java syntax for variable assignment. you cant have a bunch of english word after an equals sign for assignment. the compiler doesnt know what those words mean. it only knows keywords and varibles you tell it use.
|
Re: simple problem - code wont compile
SIGH.
Please read the java tutorials before you proceed. |
| All times are GMT -5. The time now is 1:17 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC