Results 1 to 2 of 2
  1. #1
    schvuu is offline Member
    Join Date
    Oct 2013
    Rep Power

    Default Check a list , true false

    Hello, I'm in desperate need of some quick help! ;D
    Let's say I have a hotel, and I want to check what rooms are available, simple true or false.
    I have 4 rooms on each floor, and 4 floors. Let's just call them floor A,B,C,D and room A1,A2 etc..

    How whould someting like this look like, and how do I change the value (true or false) of one specific room?

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Northern Virginia, United States
    Rep Power

    Default Re: Check a list , true false

    It depends on how you have your rooms arranged. You could use either a 4 x 4 array, a List of Lists, or a Map. Then you just use the appropriate technique to access the desired element in the data structure (aka, room) and change its status.

    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. Boolean Arrays true/false switch
    By LetsG0Blue in forum New To Java
    Replies: 20
    Last Post: 03-20-2013, 11:14 AM
  2. Replies: 1
    Last Post: 10-16-2012, 10:34 PM
  3. how to balance true and false instances per id ?
    By aneuryzma in forum New To Java
    Replies: 1
    Last Post: 03-27-2011, 02:35 PM
  4. Prime Number - true , false
    By pinkdreammsss in forum Java Applets
    Replies: 11
    Last Post: 05-04-2010, 02:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts