Question: This is a Java Homework 1- You will write a method to create a random String of characters. You will pass two integer parameters (k
This is a Java Homework
1- You will write a method to create a random String of characters. You will pass two integer parameters (k and l) and your method will return a String of (k + l) alphanumeric characters. Your method will make sure that exactly k of these characters are alphabetic (non-numeric) and exactly l are digits (numeric) Example: If I pass 3 and 3 to your method, your method should be able to return "a1b2c3", but not "a1b2c34" (too many characters total) nor "a1b234" (too many digits).
2- If you wrote method 1 recursively, explain here how the parts of a recursive solution were accomplished.
3- Give an example (not given above) of a value that your method could return using values passed other than 3 and 3. State the values passed and the value that could be returned.
4- Give an example (not given above) of a value that your method could NOT return using values passed other than 3 and 3. State the values passed and the value that cannot be returned.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
