This is how I call the method.
public static void main(String[]args) {
Scanner input = new Scanner(System.in);
customPrint(7,10);
This is my method
public static void customPrint(int intValue, int fieldWidth) {
System.out.printf("%*%d", fieldWidth, intValue);
}
My motive is to use the fieldwith as a variable in the printf statement and output the integer with the field with. However I get an error: Exception in thread "main" java.util.UnknownFormatConversionException: Conversion = '*' Any solutions?
Expected output 1