+ 1

how to limit a string in input method in java

28th Sep 2018, 4:17 PM
D Dheeraj
D Dheeraj - avatar
3 Answers
+ 3
Somthing like this maby? if(str.length>10){System.out.print("String is too long please input a string that is less or equal to 10 characters long");}
28th Sep 2018, 4:18 PM
D_Stark
D_Stark - avatar
+ 3
thank you so much bro
28th Sep 2018, 5:17 PM
D Dheeraj
D Dheeraj - avatar
+ 2
i think we can use for loop for that bro
28th Sep 2018, 5:17 PM
D Dheeraj
D Dheeraj - avatar