Results 1 to 2 of 2
  1. #1
    subith86 is offline Senior Member
    Join Date
    Jan 2011
    Location
    Bangalore, India
    Posts
    102
    Rep Power
    0

    Default Bit depth of a boolean

    I want to know what is meant by a bit depth.

    In some forums I have seen that bit depth of a boolean depends on the virtual machine. Could somebody please explain what is this all about?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,023
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by subith86 View Post
    I want to know what is meant by a bit depth.

    In some forums I have seen that bit depth of a boolean depends on the virtual machine. Could somebody please explain what is this all about?
    Sun's (or Oracle's) JVM doesn't know about booleans; a boolean as a class object member takes four bytes and a boolean stored in an array takes up a single byte. Only the value zero vs non-zero is of interest to the JVM.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Depth Perception with 2 Images
    By rp181 in forum Advanced Java
    Replies: 0
    Last Post: 02-25-2010, 12:39 AM
  2. the depth of SWT controls
    By Alarmmy in forum SWT / JFace
    Replies: 0
    Last Post: 07-13-2009, 09:51 AM
  3. Creating a tree of depth 5
    By roaan in forum New To Java
    Replies: 1
    Last Post: 07-13-2009, 09:26 AM
  4. maximum view depth?
    By Bit2_Gosu in forum New To Java
    Replies: 0
    Last Post: 02-16-2009, 02:32 PM
  5. Recursion depth in java
    By poulius in forum New To Java
    Replies: 17
    Last Post: 01-11-2009, 01:38 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
  •