None. Even tablets are considerably less than optimal (believe me, I've been trying for years now). Nothing on iOS has been suitable (caveat: I have not tried in the last six months), Android offerings tend to be better.
Java is even worse than some of the other options because of the syntactic noise: too many special characters are required in too many places.
At best you could do some limited code generation if you used some GUI-oriented block mechanism (e.g., Blockly that outputs Java code), but phone displays are small even for that limited form of interaction.