Prime Numbers using Java