public class Solution {

```
public int reverseBits(int n) {
int result = 0;
int[] m = new int[32];
for(int i = 0; i < m.length; i++){
m[i] = (n & 1);
n = n >> 1;
}
for(int j = 0; j < m.length; j++){
result = (result | m[j]);
result = result << 1;
}
return result;
}
```

}

when execute n = 1, this function return the wrong answer, 0. Can anybody help me?