Notice
Recent Posts
Recent Comments
Link
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- ๊ฐ๋ฐ
- ์ฝ๋ฉ
- ๊น๋ฏธ๊ฒฝ์๋งํ์์
- html
- ํ์ด์ฌ
- Java
- ๋ ์
- ๋ฐ์ํ
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- ์๋ฐ
- ComputerScience
- ๊นํ๋จ
- K๋ฐฐํฐ๋ฆฌ๋ ๋ณผ๋ฃจ์
- ์ฅํธ์์ค
- ํ๋ก๊ทธ๋๋ฐ
- K๋ฐฐํฐ๋ฆฌ
- JavaScript
- ๋ผํ๋ผ์ค์๋ง๋
- Python
- ์ปดํจํฐ๊ณผํ
- ์ค๋ผํด
- ์นํ์ด์ง๋ง๋ค๊ธฐ
- ์ฑ
- ์ํ
- database
- ์๋ฐ์คํฌ๋ฆฝํธ
- ๋ง์ผ๋ด๊ฐ์ธ์์๋ค์์ฐ๋ค๋ฉด
- css
- ์นํผ๋ธ๋ฆฌ์ฑ
- ๊น๋ฏธ๊ฒฝ
Archives
- Today
- Total
JiYoung Dev ๐ฅ
[JAVA] char ์์ ๋ฌธ์์ด๋ก ๋ณํํ๊ธฐ ๋ณธ๋ฌธ
String.valueOf()
public String solution(String s) {
String answer = "";
char[] arr = s.toCharArray();
int idx = 0;
for(int i = 0 ; i < arr.length ; i++) {
if(arr[i] != 32) {
if(idx % 2 == 0) {
answer += String.valueOf(arr[i]).toUpperCase();
}
else {
answer += String.valueOf(arr[i]).toLowerCase();
}
idx++;
}else {
idx=0;
answer += " ";
}
}
return answer;
}
'Question' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Spring boot] ์ฒจ๋ถํ์ผ ๊ธฐ๋ฅ ์ถ๊ฐ (0) | 2023.08.22 |
---|---|
[python] ์์์ ์๋ฆฟ์ ์ง์ (round) (0) | 2023.08.22 |
[JAVA] ๋ฐฐ์ด ํฌ๊ธฐ ๋ณ๊ฒฝํ๊ธฐ (0) | 2023.08.17 |
[JAVA] ๋ฌธ์์ด ์๋ฅด๊ธฐ(substring) (0) | 2023.08.11 |
[C#] System.Threading.Timer ์ฐ๋ ๋ ๊ตฌํ (0) | 2023.08.10 |