Question: This is the sample program which uses if statements to pop out test scores using user input.

```
import java.util.Scanner;

public class testscore
{
public static void main (String [] args)
{
    Scanner sc = new Scanner (System.in);
    System.out.println ("Enter test score: ");
    int testscore = sc.nextInt();
    char grade;

    if (testscore >= 90) {
        grade = 'A';
    } else if (testscore >= 80) {
        grade = 'B';
    } else if (testscore >= 70) {
        grade = 'C';
    } else if (testscore >= 60) {
        grade = 'D';
    } else {
        grade = 'F';
    }
    System.out.println("Grade = " + grade);
}
}

```

and this is the program I created for drink tests

```
import java.util.Scanner;

public class drinktest
{
public static void main (String[] args)
{
    Scanner sc = new Scanner (System.in);
    System.out.println ("Enter The Amount Of Drinks You've Had: ");
    int drinknumber = sc.nextInt();
    char sober;

    if (drinknumber <=2) {sober = 'A';}
    else if (drinknumber <=3) {sober = 'B';}
    else if (drinknumber <=4) {sober = 'C';}
    else if (drinknumber <=5) {sober = 'D';}
    else if (drinknumber >=5) {sober = 'F';}

    System.out.println ("Your sobreity grade is: " + sober);
}
}

```

The problem that I have is that everything works fine until the last line where it tells me that my variable isn't initialized. I did NOT get that error in the first program and to my knowledge they are identical. 

What did I do wrong?

Answer: 
```
char sober = 0; 

```

Use the above code.
You must first initialize the `sober` variable:
`char sober = 'F';`

And then, after you initialize the variable you can do the if statements.
But now you don't need to check for the 'F' grade (it is initialized as 'F') so just skip this part: 
`else if (drinknumber >=5) {sober = 'F';}`

After that we are left with:

```
char sober = 'F';

if (drinknumber <=2) {sober = 'A';}
else if (drinknumber <=3) {sober = 'B';}
else if (drinknumber <=4) {sober = 'C';}
else if (drinknumber <=5) {sober = 'D';}

System.out.println ("Your sobreity grade is: " + sober);

```