Recursion in java
I'm trying to accept an integer and a character. It should print out the integer that was entered and the character times the integer that was entered. Eg. if 3 and c was entered the output should be: 3 ccc. Thanks for any help. import java.util.Scanner; public class Histogram{ public static void Histogram_Recursive(int n, String c) { if(n==0) { return; } else { return n * Histogram_Recursive(n-1, c); } } public static void main(String[] args) { Scanner obj = new Scanner(System.in); System.out.println("Enter a Number: "); int number = obj.nextInt(); System.out.println("Enter a Character: "); String character = obj.next(); System.out.print("\n"); System.out.print(number +" "); Histogram_Recursive(number, character); } }