Question: public class E 2 0 1 2 ( public static void main ( String [ ] args ) ( Systen. out.printin ( prn ( 2

public class E2012(
public static void main(String[] args)(
Systen. out.printin(prn(2));
public static void prn(char n){
System. out.printin(n);
public static int prn (int n){
for (int i =0; i < n; i++){
prnlt (1) :
System. out. printIn();
return n
5
public static void prIt (int n){
if (n ==1)
System. out.print (n) ;
else
System. out. print (n +"-"); trace and write

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 Programming Questions!