The first comparison is satisfactory. First, the integer is converted into a string, and then a "0" is added in front of the string. The code is as follows:
int? num? =? 10;
String? str? =? string . value of( 10);
str? =? "0"? +? str
Another clever way is to add plastic numbers directly to strings, and java will automatically splice them into strings.
int? num? =? 10;
String? str? =? "0"? +? num