0
String s = "Total Count :2, Correct Count :1, Wrong Count:1, Correct :India is great,, Wrong: where aer you";
- 총 수
- 올바른 카운트
- 잘못된 카운트
int
변수
.
이것은 나에게 상당히 새롭다, 너희들이 나를 도울 것이기를 바랍니다.
String s = "Total Count :2, Correct Count :1, Wrong Count:1, Correct :India is great,, Wrong: where aer you";
int
변수.
이것은 나에게 상당히 새롭다, 너희들이 나를 도울 것이기를 바랍니다.
String s = "Total Count :2, Correct Count :1,Wrong Count:1, Correct :India is great,, Wrong: where aer you";
String[] ints = s.split("[^0-9]+");
int totalCount = Integer.parseInt(ints[1]);
int correctCount = Integer.parseInt(ints[2]);
int wrongCount = Integer.parseInt(ints[3]);
System.out.println(totalCount + " " + correctCount + " " + wrongCount); //2 1 1
@aashish_soni, 원하는 것이면 내 대답을 받아 들여야한다.) –
@aashish_soni, 나는 이것을 의미했다 : http : //i.stack.imgur.com/uqJeW.png –
[API] (http://docs.oracle.com/javase/7/docs/api/java/lang/String.html)를 읽었습니까? – PakkuDon
내가 원하는 것 : http://img0.gtsstatic.com/wallpapers/c789639a11a000fc0e9d2438962de741_large.jpeg – ruhungry