This is the phone to upgrade from loder s40 Phone to android. But the mention of lenovo model is also good except that there is removable battery in samsung phone which would easily be removed in times of hangings. You could use to try to remove and replace at times of any hanging of freezing.
If a Phone with a non-removable battery freezes, simply press and hold the power button for 10-15 secs. The device is forced to restart with this process. It is equivalent to removing the battery. Talking about the J2 Pro. the phone is good for basic usage and will not hang or freeze as long as you dont play heavy games on it.