fork(2) download
  1. import java.util.*;
  2.  
  3. class Ideone {
  4. public static void main (String[] args) {
  5. String texto = "99E65A78";
  6. List<String> partes = new ArrayList<String>();
  7. for (int i = 0; i < texto.length(); i += 2) partes.add(texto.substring(i, Math.min(i + 2,texto.length())));
  8. for (int i = 0; i < partes.size(); i++) System.out.println(partes.get(i));
  9. }
  10. }
  11.  
  12. //https://pt.stackoverflow.com/q/257349/101
Success #stdin #stdout 0.1s 27292KB
stdin
Standard input is empty
stdout
99
E6
5A
78