Source code for QuickBrownFoxExample.java:

public class QuickBrownFoxExample
{
	public static void main(String args[])
	{
		// QuickBrownFoxExample
		String str1 = "The quick brown fox";
		String str2 = "jumped over";
		String str3 = "the lazy dogs.";
		int len = str1.length();
		System.out.println("Length of '" + str1 + "' is " + len);
		len = str2.length();
		System.out.println("Length of '" + str2 + "' is " + len);
		len = str3.length();
		System.out.println("Length of '" + str3 + "' is " + len);
	}
}

Output from QuickBrownFoxExample.java:

Length of 'The quick brown fox' is 19 Length of 'jumped over' is 11 Length of 'the lazy dogs.' is 14

--- Output Ends ---

NOTE:

You are reading previously generated output. You are not currently running the QuickBrownFoxExample application at the momement. You need to compile and run the source code first.

To run this program:


Authors: Kevin Chu and Eric Brower
Copyright 2000 Prentice Hall PTR