Giter Site home page Giter Site logo

ps_study's Introduction

JAVA_PS

프로그래머스(Level 1 49/59)

프로그래머스(Level 2 35/69)

Methods...

  • 수학
Math.sqrt(double num) // (double > double) : num의 제곱근
  • 형변환

String <-> Array

String[] strArr = str.split("");   // String to Array : 문자열을 배열로 변환

String str = Arrays.toString(arr); //  (arr > str) : 배열을 문자열로 변환
String str = String.join("-",arr); //  (arr > str) : 배열을 문자열로 변환("-"를 넣어서...)
String str = String.valueOf(ch[]); //  (ch[] > str) : char형 배열을 

String <-> Number

Integer.parseInt("1004"); // ("1004" > 1004) : 문자열을 int로 변환
Integer.valueOf(str 또는 int); // 문자열(또는 int)를 Integer객체로 변환
// int num = Integer.valueOf(str) : 자동 unboxing해주는 

String str = Integer.toString(10) // (int > str) : int를 문자열로 변환
String str = String.valueOf(10) // (int > str) : int를 문자열로 변환 

List <--> Array

String[] arr = arr.toArray(new String[list.size()]) // (list > arr) : 리스트를 배열로 // 배열길이는 0 또는 list의 크기만큼 

list = Arrays.asList(arr) // (arr > list) : 배열을 리스트로
list = new ArrayList<>(Arrays.asList(arr)); //(arr > ArrayList) : 배열을 ArrayList로
list = Stream.of(arr).collect(Colletors.toList()); // (ara > list) : 스트림을 이용
  • 기타
str.indexOf("가나다") // "가나다"의 index , 없으면 -1 return
ArrayList.get(i) // i번째 인덱스 값 가져오기

ps_study's People

Contributors

tevlee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.