+ 1

How to give specified length to integers/numbers from user input?(eg. I want only 5 digits from user input no more or less)

14th Apr 2022, 10:13 AM
Stranger
Stranger - avatar
9 Respostas
14th Apr 2022, 11:27 AM
Simba
Simba - avatar
+ 2
Shrinath did you get your answer ? If not try this .. https://code.sololearn.com/cHlOUN3vtq7U/?ref=app
16th Apr 2022, 2:48 AM
BroFar
BroFar - avatar
+ 1
It converts string to integer
14th Apr 2022, 11:30 AM
Abhishek Tandon
Abhishek Tandon - avatar
+ 1
BroFar thanks buddy👍
16th Apr 2022, 3:56 AM
Stranger
Stranger - avatar
0
Simba .length() function use for strings not for integers
14th Apr 2022, 10:39 AM
Stranger
Stranger - avatar
0
Infinity Nope that doesn't work.Actually you declared str variable as local.
14th Apr 2022, 11:04 AM
Stranger
Stranger - avatar
0
Simba Yeah thx👍
14th Apr 2022, 11:29 AM
Stranger
Stranger - avatar
0
Pls i need help on a java program can i forward it here,it is urgent
15th Apr 2022, 9:06 AM
Anthony
Anthony - avatar
0
Anthony you can post in public
15th Apr 2022, 9:15 AM
Stranger
Stranger - avatar