If the variable is class variable then it will be assigned the default value(in case of integer it is 0). But if the variable is a local variable (like variable declared inside a function) and not initialized then the compiler will throw an error message.
If you have the better answer, then send it to us. We will display your answer after the approval.