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 6551107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:17:46+00:00 2026-05-25T12:17:46+00:00

byte abc[]=204.29.207.217; This is giving an error. Please, tell me correct the method.

  • 0
byte abc[]="204.29.207.217";

This is giving an error. Please, tell me correct the method.

  • 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-25T12:17:46+00:00Added an answer on May 25, 2026 at 12:17 pm

    If you’re trying to assign hard-coded values, you can use:

    byte[] bytes = { (byte) 204, 29, (byte) 207, (byte) 217 };
    

    Note the cast because Java bytes are signed – the cast here will basically force the overflow to a negative value, which is probably what you want.

    If you’re actually trying to parse a string, you need to do that – split the string into parts and parse each one.

    If you’re trying to convert a string into its binary representation under some particular encoding, you should use String.getBytes, e.g.

    byte[] abc = "204.29.207.217".getBytes("UTF-8");
    

    (Note that conventionally the [] is put as part of the type of the variable, not after the variable name. While the latter is allowed, it’s discouraged as a matter of style.)

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

Sidebar

Related Questions

please can anyone tell me the error ! i get error in the line
byte test[4]; memset(test,0x00,4); test[]={0xb4,0xaf,0x98,0x1a}; the above code is giving me an error expected primary-expression
Guys i need some help here , im getting this error here at the
This is C++ code: CCryptMD5Hash md5; CCryptProv cprov; PCWSTR pszPassword = <password>; BYTE* data
I have a column in a oracle table Lic_num char(7 byte) SELECT column1, 'ABC'
I have this int [] abc = new int[30]; Object arr = abc; How
byte b = 5; byte c = ~5; this code if written in java
I have this multi-dimensional array: char marr[][3] = {{abc},{def}}; Now if we encounter the
byte[] content = Encoding.UTF8.GetBytes(data); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = POST; request.ContentType = application/json;
Please note this link Render HTML as an Image is not helpful. In previously

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.