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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:12:30+00:00 2026-05-18T00:12:30+00:00

It is homework question. Question: Use an array of integers with size 10 and

  • 0

It is homework question.

Question:

“Use an array of integers with size 10 and print the content of the array using write( ) method.

Note: Please do not use System.out.println( ) method.”

This is what I have tried so far, but it doesn’t work.

int i = 0;
while (i != array.length) {
  byte[] temp = new byte[4];
  temp[0] = (byte) (array[i] & 256);
  array[i] = array[i] >> 8;
  temp[1] = (byte) (array[i] & 256);
  array[i] = array[i] >> 8;
  temp[2] = (byte) (array[i] & 256);
  array[i] = array[i] >> 8;
  temp[3] = (byte) (array[i] & 256);
  System.out.write(temp, 0, 4);
  i++;
}

I can’t find a way to do this, please help me out.

Thanks in advance. 🙂

  • 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-18T00:12:31+00:00Added an answer on May 18, 2026 at 12:12 am
    void printInt(int x) {
      String s = String.valueOf(x);
      for(int i = 0; i < s.length(); i++) {
         System.out.write(s.charAt(i));
      }
      System.out.write('\n');
    }
    

    Edit: prettier:

    void printInt(int x) {
      String s = String.valueOf(x);
      System.out.write(s.getBytes());
      System.out.write('\n')
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a homework question where I'm supposed to use a recursive method
Codingbat.com array question This is a simple array question, not for homework, just for
I have a homework question that says: Problem 1: Given the array [ 22
I have a homework question please help with a little explanation so that I
I'm trying to solve this problem, its not a homework question, its just code
My homework question given is: How can you print the path of the current
This IS NOT a Homework question! While building my current student database project I
This is a homework question. Frankly, I'm not sure how a C program delivers
I have a homework assigment to iterate through an object array and print out
I want to list all integers that divide n. This is a homework question.

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.