I'm trying to get my output look a little better. As long as I keep it very simple (as shown below) it works fine, but when I put the information in an ArrayList and use a constructor, I get stuck.
public class printing2 {
public static void main(String[] args) {
System.out.format("%-10s%-15s%-15s",
"LastName", "FirstName", "SocialNo");
System.out.println();
System.out.format("%-10s%-15s%-15s",
"James", "Johnson", "12345678");
}
}
I have tried to Google this for some time now, and I have tried about a thousand different ways to solve this but I just can't seem to get it right.