Answered step by step
Verified Expert Solution
Question
1 Approved Answer
onsider the following code: int[] a = {65, 78, 92, 51, 18}; for (int i = 0; i < a.length; i++) { a[i] = a[i]
onsider the following code:
int[] a = {65, 78, 92, 51, 18};
for (int i = 0; i < a.length; i++)
{
a[i] = a[i] % 10;
}
for (int i = 0; i < a.length; i++)
{
System.out.print(a[i] + " ");
}
-
6 7 9 5 1
6 7 9 5 1
-
67951
67951
-
5 8 2 1 8
5 8 2 1 8
-
58218
58218
-
There is an error in the code, so this does not run
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started