This is my assignment, before some of you complain, I finished it. It works all I want is something that is in the back of my head bugging me. If a user was to input a letter instead of a number how do I keep the program from crashing and instead print an error? I've tried google and I've tried looking around.

import java.util.Scanner;

public class Circle
{
	public static void main(String[] arg)
	{
		//create new scanner
		Scanner input = new Scanner(System.in);
		
		//declare variables
		double radius;
		double diameter;
		double circum;
		double pi = Math.PI;
		
		//Ask the question
		System.out.print("Please Enter a Radius: ");
		
		//create add proper data/calculations to variables
		radius = input.nextDouble();
		diameter = 2*radius;
		circum = 2*(pi*radius);
		
		System.out.println("Diameter: "+diameter);
		System.out.println("Circumference: "+circum);
	}
}

Nevermind I got it from this tutorial:
http://www.deitel.com/articles/java_tutorials/20060408/Arithmetic_InputMismatch_Exceptions/

import java.util.InputMismatchException;
import java.util.Scanner;

public class Circle
{
	public static void main(String[] arg)
	{
		//create new scanner
		Scanner input = new Scanner(System.in);
		
		//declare variables
		double radius;
		double diameter;
		double circum;
		double pi = Math.PI;
		
		//Ask the question
		System.out.print("Please Enter a Radius: ");
		
		
		//create add proper data/calculations to variables
		try
		{
			radius = input.nextDouble();
			diameter = 2*radius;
			circum = 2*(pi*radius);
		
			System.out.println("Diameter: "+diameter);
			System.out.println("Circumference: "+circum);
		}
		catch(InputMismatchException inputMismatchException)
		{
			System.out.println("Did you enter a number?\nRestart Program!");
		}
	}
}

Thanx but my Scanner forcefully(by assignment) had to be nextDouble but something I really have to read up on is using try/catch method and their errors/exemptions

Just to add: you can use the alternative way (a bit longer, but still can be useful some day :) ). For the case, if you don't want to interrupt your prog when the user inputs the incorrect value. You can design a method, using Class Character. This class contains method isDigit(), that can help you check, whether the given character is Digit.
Then you can do whatever you want (in case if user input incorrect value):
1. Replace the value, entered by user by default value.
2. Remove all incorrect symbols from it and return the proper value.

This question has already been answered. Start a new discussion instead.