0
Can you help me?
How can i write an output like this but with different name size? ************* * mariolina * *************
2 Antworten
+ 1
//just get length of this name change number of asterisks
public static void main (String[] args)
{
String name="SomeNameLikeYouLike";
int l= name.length() + 4;
for (int i=0;i<l;i++)
System.out.print('*');
System.out.println();
System.out.println('*' + " "+ name + " "+ "*");
for (int i=0;i<l;i++)
System.out.print('*');
System.out.println();
}