/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.siso.horario.Servlets;

/**
 *
 * @author sistem20user
 */
public class prueba {

	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		
		
   String cadena = "12345678";
	 
		char[] cadenaSeparada = cadena.toCharArray();//Conviertes la cadena en arreglo de tipo char
	
		int[] enEnteros = new int[cadenaSeparada.length];//Creas una de entero con la misma longitud
		
				for (int i = 0; i < cadenaSeparada.length; i++) {
						System.out.println(enEnteros[i] = Character.getNumericValue(cadenaSeparada[i]));//Conviertes el char en int
				}
				
				
				

}
	
	public static int[] parse(String num){
		
		char[] cadenaSeparada = num.toCharArray();
    int[] nums = new int[num.length()];
    for(int i=0; i<cadenaSeparada.length; i++){
        nums[i] = Character.getNumericValue(num.charAt(i));
    }
    return nums;
  }
	
	
	
}
