Inflearn コミュニティ Q&A
배열 변수를 그냥 리턴하면 메모리 주소값이 나옵니다.
作成
·
848
1
배열 변수를 그냥 리턴하면 메모리 주소값이 나옵니다.
[I@762efe5d
그런데 선생님은 그냥 배열 리턴하신것처럼 보이는데도 메모리 주소값이 아니라 값이 제대로 리턴되는데, 차이가 무엇일까요?
java코테 준비 같이 해요!
クイズ
What is the most efficient way to count the total number of specific characters in a string, ignoring case?
Iterate through the string and compare each character to both the uppercase and lowercase of the target character.
Convert the entire string to a single case (e.g., all uppercase) and count the characters.
Count uppercase and lowercase letters respectively and sum them.
Using a Set data structure, store characters without duplicates and then count them.
回答 1
1
배열을 출력하지말고 for문으로 배열 안 요소를 하나씩 출력하셔야합니다.
아니면 Arrays.toString쓰시면 한방에 출력은 되는데 요구하는 답의 규격은 아닐거에요





