Start New Discussion within our Software Development Community

hello.
i have created String name,surname,country;
int age;
and a scanner which takes informations from keyboard.
and this print lines:
System.out.println("Name\t Surname\t Age\t Country);
System.out.println(name+"\t"+surname+"\t"+age+"\t"+country);
NORMALLY:

EX:
Name Surname Age Country
JOHN smith 35 uk

but IF NAME HAS TOO MANY CHARS IT IS NOT DISPLAYED IN THE SAME COLUMN.
EX:
Name Surname Age Country
MARTIN TIMBERLAKE 35 CALIFORNIA

IS POSSIBLE IN JAVA TO FIX THIS ?

This article has been dead for over six months. Start a new discussion instead.