CSC 175 - Intermediate Programming

Assignment #12a - A very basic string program.

Due Friday, March 1, 2024

Strings have two basic methods that you will need for this assignment:

An example of how this may be used:

	Scanner keyb = new Scanner(System.in);
	String s = new String();
	boolean p, q;
	s = keyb.nextLine();
	p = s.equals("The end");
	q = s.equals("the end");

If the user typed in "The end" p is true and q is false (equals is case sensitive).

Write a program that prompts the user for a line of text, prints it and repeats this until the user types "The end"

[Back to the Assignments List]