Coding Slothly

  • 홈
  • 방명록

java 2

String, StringBuffer and StringBuilder

String . - String is immutable. - It seems mutable in certain cases, but it is a misconception. String hi = "Hi" hi += "Hello" //it seems that we just changed the object itself from "Hi" to "HiHello" //but what really happened is that we created a new String value "HiHello" and //changed the reference of the object hi from "Hi" to "HiHello" StringBuffer - StringBuffer is a data type that is used..

Notes for Java 2022.07.01

Methods of String

String.format - returns a formatted String value. ex) String.format("The answer is %d", 3) returns "The answer is 3" - can be used with System.out.println ex) System.out.println(String.formate("The answer is %d", 3)) String.split("delimiter") - splits the String value using delimiter and returns a String type array. String hi = "Hi Hello"; String[] prac = hi.split("H"); //prac = ["", "i ", "ello..

Notes for Java 2022.07.01
이전
1
다음
더보기
프로필사진

slow and steady wins the race.

  • 분류 전체보기 (36)
    • Algorithm (1)
    • Notes for Java (2)
    • Notes for Python (0)
    • Notes for C (4)
    • BOJ (29)

Tag

백준 2420 c언어, beakjoon 18111, java string, 백준 18111번, 백준 마인크래프트, scanf, beakjoon 9375 python, 2차원 배열, 증감연산자, 백준 18111번 마인크래프트, 백준 2420 c, 백준, beakjoon 18111 python, 백준 마인크래프트 파이썬, 백준 18111번 마인크래프트 파이썬, java, 백준 18111번 파이썬, python 9375, 오버플로우, 백준 18111 파이썬,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/05   »
일 월 화 수 목 금 토
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 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바