数组和字符串

use*_*603 1 java arrays string character-arrays

我有一个类型char和字符串数组,我将从键盘中介绍.任何人都可以告诉我如何在char数组中引入字符串的每个字符?

Sum*_*mit 7

您不需要提前创建数组.这是代码

String s; //this is your string which you enter from keyboard

char[] c=s.toCharArray();
Run Code Online (Sandbox Code Playgroud)