Question: JAVA Programs 1) Write a recursive method to produce a pattern of n lines of asterisks. The first line contains one asterisk, the next line

JAVA Programs
1) Write a recursive method to produce a pattern of n lines of asterisks. The first line contains one asterisk, the next line contains 2, and so on, up to the nth line, which contains n asterisks Line n+1 contains n asterisks. The next line has n-1 asterisks, and so on until line number 2n which has 1 asterisk. You can use a recursive method, an additional parameter, or a loop to print the asterisks.
Example Output:
*
**
***
****
****
***
**
*
2) Write a recursive method to return a converted character string of digits as an integer. You can pass as many arguments as you please, an example could be: convert(1234); This call returns 1234. Hint to convert a character to a number subtract ASCII 0 from it.

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!