How to print last two digits of given integer a=1234 in java

前端 未结 3 770
無奈伤痛
無奈伤痛 2021-01-04 23:57

If i\'m giving values like a=1234, i want to print last two digits 34 only.. can anyone give me solution for this...

int a=1234;
System.out.print(a);
         


        
3条回答
提交回复
热议问题