Question: I need it in java and word file 3. Write a method countSquares that goes through an array, counting and then returning thoe number of

I need it in java and word file
 I need it in java and word file 3. Write a

3. Write a method countSquares that goes through an array, counting and then returning thoe number of perfect squares in the array using the following isSquare method: public static boolean isSquare (int num) double sqrt Math.sqrt(num); return sqrt "" int) sqrt); Example: int a[] = {4,6,3,9,8, 16); System.out.print (countSquares (a)):1/ will print "3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!