Write a method named rowofstars that takes a single integer


You have to answer the following questions.

Question 1: Write a method named rowOfStars that takes a single integer parameter n and returns a String with that many stars in it.

For instance, calling the method with a value of three would cause the String "***" to be returned.

Question 2: Using the method you wrote for the previous question, write a method that takes a single integer parameter nand prints a triangle of stars to the screen that has a height and base size equal to n. For case, calling the method with a value of 4 will produce the triangle:

You need to implement this in java language. You need to provide the answer as soon as possible.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a method named rowofstars that takes a single integer
Reference No:- TGS0962046

Expected delivery within 24 Hours