Write a recursive nonvoided function in java that will test

Write a recursive non-voided function in java that will test to see if the input String parameter belongs to the following form: AnB3n, where n >= 0.

example: if n = 1, the string should look like ABBB

if n = 2: AABBBBBB

if n = 3: AAABBBBBBBBB

pls halp

Solution

Please find the required program along with its output. Please see the comments against each line to understand the step.

-------------------------------------------------

OUTPUT:

Is in form :true

Write a recursive non-voided function in java that will test to see if the input String parameter belongs to the following form: AnB3n, where n >= 0. example

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site