• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

DataType

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A signed data type has an equal number of non-zero positive and negative values available

1.true

2.false

Answer: 2

I couldn't understand this Question?.
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
zero plus number of positive numbers is equal to the number of negative numbers for a signed data type.

please check it.
 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a signed datatype for example byte. Its range is -127 to 128 so there are -1 to -127 are negativa values and 1 to 128 are position values.
127 negative values
128 position values
127 == 128 is false.
So answer is false.
I hope this is correct.
Thanks
Deepak
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
byte range is from -128 to 127
so there is 1 more negative number than positive number in total i.e
-1 to -128(128 numbers in total ) and 1 to 127 (127) numbers in total
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The data types byte, short, int and long (the signed integer data types) are stored as two's complement in Java. Read that page and you'll understand why the range of a byte is -127 to +128, etc.
 
reply
    Bookmark Topic Watch Topic
  • New Topic