Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to store an integer in an array of strings in java. I'm working with a 2-D array and I'm trying to input integers in

how to store an integer in an array of strings in java. I'm working with a 2-D array and I'm trying to input integers in one column of the array. I tried

String[][] report = new String[8][5];

report[0][0] = "Quiz ";

report[0][1] = " High";

report[0][2] = "\t";

report[0][3] = "Low ";

report[0][4] = " Average";

for(int i = 1;i<2;i++) {

for(int j =0;j<5;j++) {

report[i][j] = "=======";

}

}

int num = 1;

for(int i =0;i<1;i++) {

for(int j =2;j<8;j++) {

report[j][i] = num.toString();

num++;

}

}

and I am getting...

(X) Cannot invoke toString() on the primitive type int

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago