1. Identify and fix the errors in the following program: public class Exercise10 { public static void main(String[] args) { Exercise10 ex = new Exercise10(); System.out.println(ex); } // end main...


1. Identify and fix the errors in the following program:


public class Exercise10


{


public static void main(String[] args)


{


Exercise10 ex = new Exercise10();


System.out.println(ex);


} // end main


public Exercise10()


{


Exercise10 ex = new Exercise10();


} // end default constructor


} // end Exercise10


2. Consider the method displayRowOfCharacters that displays any given character the specified number of times on one line. For example, the call


displayRowOfCharacters('*', 5);


produces the line


*****


Implement this method in Java by using recursion.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here