The document describes a Java program that takes an integer array as input, counts the number of times the value 5 appears, creates a new array of that length, copies all elements equal to 5 into it, and prints out both arrays.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
6 views
Answer Java in Exam
The document describes a Java program that takes an integer array as input, counts the number of times the value 5 appears, creates a new array of that length, copies all elements equal to 5 into it, and prints out both arrays.