StringsTester - String s1 = input.nextLine(); if

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

View Full Document Right Arrow Icon
//class StringsTester import java.util.Scanner; public class StringsTester { // define main method public static void main (String [] args){ System.out.println("Enter a String:"); Scanner input = new Scanner(;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: String s1 = input.nextLine(); if (s1.equalsIgnoreCase("Manchester")) { System.out.println("Welcome to Manchester"); } else (System.out.println("You entered:" + (s1))); } } // end of class StringsTester...
View Full Document

This document was uploaded on 04/14/2010.

Ask a homework question - tutors are online