Names - System.out.println...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// *************************************************************** // // // Prints a list of student names with their hometowns // and intended major // *************************************************************** public class Names { // ------------------------ // main prints the list // ------------------------ public static void main (String[] args) { System.out.println (); System.out.println ("\tName\t\tHometown\tMajor");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println ("\t====\t\t========\t====="); System.out.println ("\tSally\t\tRoanoke\t\tComputer Science"); System.out.println ("\tAlexander\tWashington\tMath"); System.out.println ("\tStudent 1\tSometown\tSome Major"); System.out.println ("\tName 2\t\tAnother Town\tA Major"); System.out.println ("\tName 3\t\tSomewhere\tSome Major"); System.out.println (); } }...
View Full Document

This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.

Ask a homework question - tutors are online