Последний символ строки


/ Published in: Java
Save to your folder(s)

Возвращает последний символ строки в формате String


Copy this code and paste it in your HTML
  1. public String lastTask(String str) {
  2. return Character.toString(str.toCharArray()[str.length() - 1]);
  3. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.