Based on the concept that if a number is >4 we can break it into number of 3's and the product of 3's are always greater. 3*3*3*3 > 4*4*4 for n=12

```
public int integerBreak(int n) {
if(n==2)return 1;
if(n==3) return 2;
int result=1;
while(n>=3 && n!=4){
result*=3;
n-=3;
}
if(n==4 || n==2){
result*=n;
}
return result;
}
```