Inflearn brand logo image
Inflearn brand logo image
Inflearn brand logo image
BEST
Programming

/

Programming Language

More Java, Java 8

The features added to Java 8 are widely used in APIs provided by Java as well as third-party libraries and frameworks such as Spring. If you are a Java developer in this era, you must know them. Make them your own technology easily and quickly through this lecture.

(4.9) 329 reviews

4,387 learners

  • whiteship
Java

Reviews from Early Learners

What you will learn!

  • Learn about functional interfaces, lambdas, and method references.

  • Learn about basic and static methods in interfaces.

  • Learn about Streams and Optionals.

How to properly utilize JAVA 8
I'll show you the smartest way.

🙆🏻‍♀ In this lecture, we will learn about the major features added in Java 8.
Understand Java 8 code and write it yourself! 🙆🏻‍♂

Lecture Introduction 👨‍💻

Learn about Java 8, which was first released in March 2014 and is still the most widely used version by Java developers, more than six years later.

If you've finished learning the basics of Java, but still feel like you don't know much about it and see unfamiliar syntax when looking at code written by others , it may be because you don't fully understand the features added in Java 8 .

What can you do with Java 8? 🐔🍴

Here we have a pre-built chicken that implements an interface called Chicken.

public class KeesunChicken implements Chicken {

}

As you can see, we only implemented the interface and did not override any methods.
But this is possible.

public class App {

public static void main(String[] args) {

Chicken keesun = new KeesunChicken();

Egg egg = keesun.create();

}

}

How on earth did we come to be able to use the create() method that returns an Egg?

Now, let's look at the following code. Here's a chicken. It's tending an egg that wants to grow into a half-and-half chicken.

Chicken.takesCare(new Egg() {

@Override

public String wannaBe() {

return "half seasoned half fried";

}

});

This code can also be shortened to:

Chicken.takesCare(() -> "Half Seasoned Half Fried");

Are you wondering how we can reduce it so cleanly without even using the Egg type?

This time, let's classify eggs.

List eggs = new ArrayList<>();

eggs.add(EggWithColorAndSize.of().size(3).color("yellow"));

eggs.add(EggWithColorAndSize.of().size(4).color("white"));

eggs.add(EggWithColorAndSize.of().size(3).color("white"));

eggs.add(EggWithColorAndSize.of().size(5).color("yellow"));

eggs.add(EggWithColorAndSize.of().size(3).color("brown"));

eggs.add(EggWithColorAndSize.of().size(4).color("yellow"));

Among the eggs shown here, let's select only the yellow eggs, sort them by size, and then print the egg's wannaBe.
After taking this course, you will be able to write and understand code like this:

eggs.stream().filter(e -> e.getColor().equals("yellow"))

.sorted(Comparator.comparingInt(EggWithColorAndSize::getSize))

.map(EggWithColorAndSize::wannaBe)

.forEach(System.out::println);

You can also understand and write code like the following, which runs the egg-laying task in a separate thread and then enjoys the egg (with a callback) when it's laid:

CompletableFuture future = CompletableFuture.supplyAsync(() -> {

System.out.println("Kkokio~ Kkokkokko~ " + Thread.currentThread().getName());

return EggWithColorAndSize.of().size(5).color("white");

}).thenAccept((egg) -> {

System.out.println("Yum yum yum: " + egg.wannaBe());

});


future.get();

There are many other interesting contents provided by Java 8, such as Date and Time API, changes in annotations, and changes in memory areas, so please take the class.

thank you

Recommended for
these people

Who is this course right for?

  • Developers or students who have completed basic Java programming training

  • Developers or students who want to learn the key features of Java 8

Need to know before starting?

  • Java Programming Fundamentals

Hello
This is

92,167

Learners

4,200

Reviews

2,010

Answers

4.8

Rating

20

Courses

네이버와 아마존을 거쳐 현재 Microsoft에서 시니어 소프트웨어 엔지니어로 일하고 있습니다.

아인슈타인은 "교육이란 사실을 가르치는 것이 아니라, 생각할 수 있는 힘을 기르는 것이다."라고 말했습니다. 그리고 저도 그 말에 깊이 공감하며 강의를 만들고 있습니다.

유튜브:
'백기선' 채널에서 개발자 고민 상담 및 개발자에게 유용한 지식 공유
번역: 스프링 및 하이버네이트 관련 서적 다수 번역
저술: 쉽게 따라하는 자바 웹 개발

Curriculum

All

23 lectures ∙ (4hr 56min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

All

329 reviews

4.9

329 reviews

  • Pepper Mill님의 프로필 이미지
    Pepper Mill

    Reviews 3

    Average Rating 4.3

    3

    100% enrolled

    "강의보단 라이브 코딩 수업에 가까움" 아마 대부분 사람들은 전문 강사, 교사에게 수업을 받은 적이 있을 겁니다. 잘 정제된 수업진행, 풍부한 자료 등 이런 것을 기대하기는 힘든 강의입니다. 다만 다루는 주제에 대해서 생각해보고, 찾아보고 직접 해보면서 습득할 수 있으신 분들에게는 괜찮은 강의라고 생각합니다. 저는 학생 신분이라서 추가적인 시간을 할당할 수 있었지만, 바쁘신 분들은 강의 진행이 별로일 것 같다는 생각이 듭니다. 다만, 최근 올리신 강의는 이런 문제를 개선하신 것 같습니다. 예전 강의인 만큼 감안하시고 선택하시길 바랍니다.

    • MyCatIsRockstar님의 프로필 이미지
      MyCatIsRockstar

      Reviews 9

      Average Rating 5.0

      5

      43% enrolled

      이 강의 덕분에 제가 자바를 좋아하게 되었다고 해도 과언이 아닙니다. 특히 스트림이랑 함수형 인터페이스 부분을 이렇게 쉽게 설명해주신 분은 기선님이 처음입니다ㅠㅠ.. 덕분에 맨날 자바로 코테 본다고 하면 해보지도 않고 포기했던 제가 자바로 코테 공부를 하게 되었습니다. 성의 없다고 느껴진다는 피드백도 있는데 저는 오히려 자바를 어려워 할 필요 없다는 듯한 기선님의 무심한 말투가 제가 가지고 있던 자바에 대한 부담감을 덜어주셔서 좋았습니다. 이거 듣고 저는 이펙티브 자바 1,2랑 코드 조작도 샀어요!! 진짜 킹갓 제너럴 기선님 감사합니다 감사합니다 🥹🥹

      • euni님의 프로필 이미지
        euni

        Reviews 26

        Average Rating 5.0

        5

        100% enrolled

        몇몇 수강평들 때문에 망설이다가 결제했는데, 진짜 초등학교처럼 가르쳐줘야 만족하는 분들이 많으신 것 같네요.. 전 기선님이 답변하는 부분에 있어서는 종종 다소 불친절하다고 느껴본 적 있지만 강의에서는 늘 목소리도 좋으시고 완벽하게 준비해놓고 시작하는 강의는 아니지만 오히려 마이크로소프트에 일하는 엘리트 개발자께서도 이런 식으로 찾아가며 하는구나 싶어서 그런 부분까지 배울 점이라고 봅니다. 내용도 무조건 많다고 좋은 게 아니라고 보구요. 가끔 가격 대비 수강 시간만 엄청 긴 강의들 있는데, 들어보면 기선님처럼 5분이면 설명할 수 있을 거 20분 30분 늘여가며 설명하는 경우가 대부분입니다.. 제가 시간이 없어서 아직 기선님 강의를 많이 들어보지는 못했으나 제가 지금까지 들어본 바로는 모두 가격 대비 만족도 높은 편이라고 봅니다. 초등학생 가르치듯 알려주는 강의 보고 싶으면 다른 걸 보시되, 진짜 알짜베기만 빨리 빨리 배우고 싶으면 기선님 강의 추천합니다. 제가 들어본 것들은 다 좋았어요.

        • 박정욱님의 프로필 이미지
          박정욱

          Reviews 3

          Average Rating 4.7

          4

          100% enrolled

          JAVA8에 대해 다시 생각해보는 기회여서 좋았습니다. 새로 생긴 기능도 한번씩 보여주고 곱씹어 보면서 익숙해지는 과정을 가지니 좋았던 것 같습니다. 코드 작성시 하나의 class에서 내용을 지웠다 적었다 하는 것보다는 수업마다 패키지 등을 만들어 진행하면 더 완벽한 강의가 될 것 같습니다.

          • 지토님의 프로필 이미지
            지토

            Reviews 6

            Average Rating 5.0

            5

            100% enrolled

            자바를 다년간 써왔지만 자바8 이후의 문법들에 익숙하지 않고 기존의 문법들만 사용해왔었습니다. 해당 강의 덕분에 새로운 문법과 기능들을 학습할 수 있었고, 시야가 넓어진 것 같습니다. 감사합니다 :)

            • 백기선
              Instructor

              잘 수강하셨습니다. 이 강의에서 다룬 기능들은 앞으로 자바를 쓴다면 기본으로 쓰이게 될 기능입니다. 수강평 감사합니다.

          $42.90

          whiteship's other courses

          Check out other courses by the instructor!

          Similar courses

          Explore other courses in the same field!