public class ForLoopColorsExample3
{
	public static void main(String args[])
	{
		// ForLoopColorsExample3
		String colors[] = {"red", "yellow", "blue", "purple"};
		for (int i = 0; i < colors.length; i++)
		{
			if (colors[i].equals("blue"))
			{
				System.out.println("name = " + colors[i]);
				System.out.println("index = " + i);
			}
		}
	}
}
