I switched from eclipse to android studio recently. During coding i got some strange behavior. I am having boolean variable where i am passing to if condition like this.
boolean permissionGranted;
if(permissionGranted){
//Do work
}else{
}
It works fine with eclipse. But in android studio it ask me to initialize boolean variable;
As per my understanding by default boolean varaible will be intialized to false. Still studio asking me to intialize by myself. What could be the reason behind this?