java -Convert String To Char Array
public class StringToCharArray { public static void main(String[] args) { String blogNname = "thanhcs94"; char[] blogNameInCharArray = blogName.toCharArray(); for(char temp: blogNameInCharArray){ System.out.println(temp); } } }
OUTPUT:
t h a n h c s 9 4
No comments: