프로그래밍/연습문제
String 연습문제 2
카라미
2016. 2. 19. 12:29
public class StringExam2 {
//문자열을 입력받아서 공백의 개수를 리턴하는 메소드
public static int spaceCount(String str){
return 0;
}
//문자열을 입력받아서 알파벳 개수를 리턴하는 메소드
public static int alphaCount(String str){
return 0;
}
public static void main(String[] args) {
System.out.println(spaceCount("test tset ts ttt")); //3
System.out.println(alphaCount("test tset ts ttt")); //13
}
}