Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 520653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:10:04+00:00 2026-05-13T08:10:04+00:00

In Sun’ tutorial it says about a byte: byte: The byte data type is

  • 0

In Sun’ tutorial it says about a byte:

byte: The byte data type is an 8-bit signed two’s complement integer. It has a minimum value of -128 and a maximum value of 127 (inclusive). The byte data type can be useful for saving memory in large arrays, where the memory savings actually matters. They can also be used in place of int where their limits help to clarify your code; the fact that a variable’s range is limited can serve as a form of documentation.

How does it save memory? What is 2’s compliment?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:10:05+00:00Added an answer on May 13, 2026 at 8:10 am

    It saves memory by consuming only eight bits of storage, versus 32 for integers. The size of arrays is directly proportional to the size of the contained datatype; an array of integers will consume about four times more memory (handwaves) than an array of bytes.

    From Wikipedia:

    A two’s-complement system or
    two’s-complement arithmetic is a
    system in which negative numbers are
    represented by the two’s complement of
    the absolute value;1 this system is
    the most common method of representing
    signed integers on computers.[2] In
    such a system, a number is negated
    (converted from positive to negative
    or vice versa) by computing its two’s
    complement. An N-bit two’s-complement
    numeral system can represent every
    integer in the range −2^(N−1) to
    +2^(N−1)−1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I read in Sun official documentation (or Sun online tutorial) about dotted naming for
I am going through Sun's Java tutorial. I am in the lesson about sockets.
I was reading this Sun's tutorial on Thread . I found a block of
Sun's JVM comes in two flavors: -client and -server , where the Server VM
Since Oracle took over Sun... this specific resource has apparently vanished. I tried the
Oracle/Sun says its fine as long as you don't run it locally on production
According to: http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.html 4.5.2 Variables of Reference Type A reference type can hold a
From http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html#99740 example A3.3 says, it says that an object might still not be
From Sun's Java Tutorial , I would have thought this code would convert a
I noticed Sun is providing a 64-bit version of Java. Does it perform better

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.