JAVA: Read char from String to a certain char -


Is there a way or method to read and read with a string, putting them in a new string, fixed four & lt ; Thankx

Absolutely. You will need it:

  • Method String.charAt (int)
  • + operator (or method String.concat , or, if the performance case, class StringBuilder )
  • for statement
  • and A break statement with a if -statement

is explained in statements and operators, and in the method AP javadoc.

(And no, I will not provide an implementation because you will learn a bit by copying it)


Comments