String nodeKey="Manual3"; String lastChar = nodeKey.substring(nodeKey.length() - 1, nodeKey.length());