Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-20-2007, 06:02 PM
Member
 
Join Date: Nov 2007
Posts: 38
Rep Power: 0
dirtycash is on a distinguished road
Default 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
  #2 (permalink)  
Old 11-20-2007, 06:49 PM
hardwired's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 1,577
Rep Power: 4
hardwired is on a distinguished road
Default
//declaring
private static int freeRooms; //number of rooms available in the hotel
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

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

BB 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 3 12-12-2008 01:12 PM
Peculiarty in code of simple program... Kreuz14 New To Java 4 01-23-2008 04:27 AM
simple code elizabeth New To Java 1 08-07-2007 07:49 PM
problem when I try to compile a program from command prompt osval Advanced Java 2 08-06-2007 10:16 PM
problem with a simple java code boy22 New To Java 2 08-03-2007 03:46 AM


All times are GMT +2. The time now is 02:54 PM.



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