Menu

[solved]-Write Java Method Takes Integer Array Named Parameter Returns Boolean Method Return True I Q39031100

Write the Java method below, that takes an integer array named aas a parameter and that returns a boolean. The method should returntrue if a has an integer that is divisible by 4 followed by aninteger that is divisible by 9 somewhere later in the array.

public static boolean has49Divisible(int[] a){

*Can you show where I am able to check the answer

example:

int[] a1 = { 36, -3, 2, 45};          boolean b1 = has49Divisble(a1);     returns true

int[] a2 = { 5, 9, 3};                   boolean b2 = has49Divisible(a2);     returnsfalse

Expert Answer


Answer to Write the Java method below, that takes an integer array named a as a parameter and that returns a boolean. The method s… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *