Error in the program

Can you tell me why this error is coming?

import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int a = scn.nextInt();
int b,c;
if(a==1||a==2){
System.out.print("-1");
}else if(a%2==0){
b=((aa)/4)-1;
c=((a
a)/4)+1;
}else if(a%2!=0){
b=((aa)-1)/2;
c=((a
a)+1)/2;
}
if(b>c){
System.out.print(c+" “+b);
}else
System.out.print(b+” "+c);
}
}

Compiling failed with exitcode 1, compiler output:
Main.java:16: error: variable b might not have been initialized
if(b>c){
^
Main.java:16: error: variable c might not have been initialized
if(b>c){
^
2 errors

@sanchit02,
In case the value of a is 1 or 2. After printing -1, it will jump to if(b>c) block which has not been initialized and hence the error. Corrected code: https://ide.codingblocks.com/s/191712
Your logic is correct

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.