I am a new learner of Java.
Thq question is "Write a Java program ShowStars.java so that java ShowStars numA1 numB1 .... display a sequence of stars "*", starting from position numA1 and ending at position numB1. If there are further such integer pairs, say, numA2 and numB2, do the same for the next line. For example,
java ShowStars 2 3 1 4
gives
**
****
my incomplete code is shown below:
import java.util.Scanner;
import java.lang.String;
public class ShowStars {
public static void main(String[] args) {
String aString;
for (int i = 0; i < num1.length; i++){
for (int j = 0; j < num2.length; j++)
System.out.print("*");
}
}
Any suggestions what should I add?