Giter Site home page Giter Site logo

java-basic202301's Introduction

#자바프로젝트 기본 설정

  1. 플러그인 설치
  • file -> settings
  • 왼쪽 plugins 선택
  • korean language package install
  • material theme, atom material icon install
  1. 폰트 크기 조절 설정
  • 파일 -> 설정
  • 마우스 검색 후 에디터 -> 일반 탭
  • Ctrl + wheel로 글꼴 크기 설정 체크
  1. 한글 깨짐 설정 -shift 두번 누르고 검색창에 vm 검색 -사용자 지정 vm 옵션 편집 클릭
  • '-Dfile.encoding=UTF-8' 입력 후 재실해
  • 파일 ->설정 클릭 후
  • 빌드 도구 -> gradle 탭 클릭
  • 실행 환경과 테스트 환경을 gradle에서 intellij로 변경
  1. 인텔리제이에서 깃허브 한번에 연동
  • vcs에서 깃허브

자바 8 람다 문법

  • 여러가지 람다 표현식

    1. (String s) -> s.length() : String형식의 파라미터 하나를 가지며 int를 반환한다. 람다표현식에는 return이 함축되어 있다.
    2. (Apple a) -> a.getWeight() > 150 : Apple형식의 파라미터 하나를 가지며 boolean을 반환한다.
    3. int형식의 2개의 파라미터를 가지며 리턴값이 없다.
           (int x, int y) -> {
               System.out.println("Result:");
               System.out.println(x + y);
           }
      
    4. () -> 42 : 파라미터가 없으며 42를 반환한다.
  • 제공되는 함수형 인터페이스

    함수형 인터페이스 함수 디스크립터
    Predicate T -> boolean
    Consumer T -> void
    Function<T, R> T -> R
    Supplier () -> T
    UnaryOperator T -> T
    BinaryOperator (T, T) -> T
    BiPredicate<L, R> (T, U) -> boolean
    BiConsumer<T, U> (T, U) -> void
    BiFunction<T, U, R> (T, U) -> R
  • 메서드 참조

    • (args) -> ClassName.staticMethod(args) => ClassName::staticMethod

      • () -> Math.random() => Math::random
      • message -> System.out.println(message) => System.out::println
    • (args0, rest) -> args0.instanceMethod(rest) => ClassName::instanceMethod

      • (str, i) -> str.substring(i) => String::substring
      • (apple) -> apple.getWeight() => Apple::getWeight
    • (args) -> expr.instanceMethod(args) => expr::instanceMethod

      • (s) -> this.isValidName(s) => this::isValidName
  • 생성자 참조

    • () -> new Constructor() => ClassName::new
      • () -> new Apple() => Apple::new
    • (args) -> new Constructor(args) => ClassName::new
      • (weight) -> new Apple(weight) => Apple::new

java-basic202301's People

Contributors

taecode 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.