Write a JAVA method that expands a given binomial (ax + by)n, where integers a, b, n are user inputs. For example, if a = 2, b = -12, n = 4 are entered the method should print or return

Java
Write a JAVA method that expands a given binomial (ax + by)n, where integers a, b, n are user inputs.  For example, if a = 2, b = -12, n = 4 are entered the method should print or return
Source

Also in Java: