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
- Spring
- 상속
- 리액트네이티브아이콘
- app:compiledebugkotlin
- map
- 스크롤이벤트
- set
- TS
- array
- materialicons
- err_connection_refused
- 타입스크립트
- javascript
- reactnative error
- Next.js
- 이진탐색
- 안드로이드빌드에러
- generic
- react
- mainapplication.kt
- npm에러
- async
- 배열중복요소제거
- app.post
- extends
- interface
- 슬라이딩윈도우
- forwardref type
- Filter
- reactnative
Archives
- Today
- Total
목록substring (1)
rhanziy
23.04.03. 작은 실습
메소드 강의 들으면서 개인정보 일부분을 숨겨주는 프로그램 코드 작성 public class Method { public static String getHiddenData(String data) { // data파라미터의 길이에 따라 index값 할당 int index = (data.length() > 12) ? 9 : 1; // substring으로 index만큼 문자열 자르기 String hiddenData = data.substring(0, index); // 나머지 부분 * 로 채움 for(int i = 0; i < data.length() - index; i++) { hiddenData += "*"; } return hiddenData; } public static void main(String[..
Java
2023. 4. 3. 11:22