Source code for CharArrayExample.java:

public class CharArrayExample
{
	public static void main(String args[])
	{
		// CharArrayExample
		char letters[] = { 'a', 'b', 'c' };
		System.out.println(letters.length);
	}
}

Output from CharArrayExample.java:

3

--- Output Ends ---

NOTE:

You are reading previously generated output. You are not currently running the CharArrayExample 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