Opening the reading…
Opening the reading…
PROGRAMMING FUNDAMENTALS › JAVA FUNDAMENTALS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Transform the array [0, 5, 0, 2, 8, 0] in place into [5, 2, 8, 0, 0, 0]. Use one left-to-right compaction pass followed by one pass that fills the remaining positions with zeros.
OUTPUT
Sample5 2 8 0 0 0
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.