Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-20-2007, 07:02 PM
Member
 
Join Date: Nov 2007
Posts: 36
dirtycash is on a distinguished road
simple problem - code wont compile
Code:
public class Hotel { public static final int ROOM_PRICE = 20; public static final int SEAVIEW_SUPPLEMENT = 5; public static final int SINGLE_OCCUPIER_SUPPLEMENT = 5; public static final int DINNER_PRICE = 9; //declaring private Room[] array1; //An integer value representing the amount of money the hotel taken. private int hotelMoney = 0; //declaring private static int freeRooms=number of rooms available in the hotel; //An integer value indicating the amount of free rooms available. public void freeRooms() { freeRooms=freeRooms-1; } }
it says a ";" is expected and highlights the following:
Code:
private static int freeRooms=number of rooms available in the hotel;
any help would be appreciated.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2007, 07:49 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
//declaring
private static int freeRooms; //number of rooms available in the hotel
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
a simple code (cldc or midp) to write a text file ouside of the application package sina CLDC and MIDP 2 03-13-2008 12:33 PM
Peculiarty in code of simple program... Kreuz14 New To Java 4 01-23-2008 05:27 AM
simple code elizabeth New To Java 1 08-07-2007 08:49 PM
problem when I try to compile a program from command prompt osval Advanced Java 2 08-06-2007 11:16 PM
problem with a simple java code boy22 New To Java 2 08-03-2007 04:46 AM


All times are GMT +3. The time now is 03:04 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org