Java 8 Programming/Coding interview Question and Answers with Sort Limit and Skip | Code Decode

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024
  • In this video of code decode we have covered Java 8 scenario based coding interview questions and answers for both freshers and experienced
    Udemy Course of Code Decode on Microservice k8s AWS CICD link:
    openinapp.co/u...
    Course Description Video :
    yt.openinapp.c...
    Most Asked Core Java Interview Questions and Answers : • Core Java frequently a...
    Advance Java Interview Questions and Answers : • Advance Java Interview...
    Java 8 Interview Questions and Answers : • Java 8 Interview Quest...
    Hibernate Interview Questions and Answers : • Hibernate Interview Qu...
    Spring Boot Interview Questions and Answers : • Advance Java Interview...
    Angular Playlist : • Angular Course Introdu...
    SQL Playlist : • SQL Interview Question...
    GIT : • GIT
    Subscriber and Follow Code Decode
    Subscriber Code Decode : www.youtube.co...
    Linkedin : / codedecodeyoutube
    Instagram : / codedecode25
    #codedecode #java8shortcicrcuit #javainterviewquestionsandanswers

ความคิดเห็น • 109

  • @ajaykrishna441
    @ajaykrishna441 2 ปีที่แล้ว +36

    Only Because of this channel I got 8.5 lakhs package in just 1 month with 2 years of experience. Thank you very much 👍🔥

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +4

      Many congratulations Ajay. Well deserved 🎊🎊🎉🎉. Keep learning keep rocking Man 👍👍

    • @islamiyazindagi6178
      @islamiyazindagi6178 2 ปีที่แล้ว

      Great.congrats.
      I m also preparing for the same..

    • @anuragarora2960
      @anuragarora2960 2 ปีที่แล้ว

      Hi @Ajay krishna did u have real world exp in Java or with u showed fake experience

    • @Modi-y7k
      @Modi-y7k 2 ปีที่แล้ว

      @@anuragarora2960 this is sure that you are applying on fake experience...hahaaaa...myself too...

    • @DR-jl6fm
      @DR-jl6fm 11 หลายเดือนก่อน

      could you please share your resume, and also which company

  • @piyushcool21
    @piyushcool21 2 ปีที่แล้ว +6

    Your explanation quality is good 👍 I always prefer live demo to understand any concept ☺️ Appreciate your work 🙏

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks Piyush 🙂🙂👍👍

  • @AmitDoiphode
    @AmitDoiphode 2 ปีที่แล้ว +2

    Very well explain. Thank you. If possible can you please make one video on most asked java 8 program using Stream API. a) Find Number of occurrences of all char in string using Streams.

  • @rushikeshgodase8498
    @rushikeshgodase8498 ปีที่แล้ว +1

    Simple way :
    List descSortList = employeeList.stream()
    .sorted(Comparator.comparing(Employee::getSalary).reversed())
    .limit(3)
    .toList();

  • @udaykumar5632
    @udaykumar5632 2 ปีที่แล้ว +2

    Thank you so much madam I am learning a lot of content from your channel videos this was very helpful please do more videos on coding interview questions which will help us in cracking interviews
    Thank you

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks Uday. Sure we will do that🙂🙂👍👍

  • @Jashan77114
    @Jashan77114 2 ปีที่แล้ว +1

    Hi, I cleared the interview of sapient which was of around 2.5 hrs because of your videos. Thank you. Hope i get offer letter soon.

  • @amolorape13
    @amolorape13 2 ปีที่แล้ว +1

    Thank you codedecode because of you.. I cracked lots of interview got appropriate package as well as..

  • @balkrishnatalke7484
    @balkrishnatalke7484 2 ปีที่แล้ว +2

    Great, I have become fan of you and your videos...

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks a tonn Balkrishna. Glad to have you aboard 🙂🙂👍👍

  • @DineshKumar-hi7fh
    @DineshKumar-hi7fh 2 ปีที่แล้ว +3

    Expecting more on this content especially your explanation on limit(),skip() gives me clear picture on usage of such methods and it is really different from my point of understanding what i read from websites with examples.Thanks a lot team and it will good if you do on peek(),reduce() and also on parallel streams etc.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      All these videos are already created Dinesh: th-cam.com/video/1Cs7X-JYkTY/w-d-xo.html

  • @abhisheksadhu411
    @abhisheksadhu411 2 ปีที่แล้ว +1

    Like always...this channel is a blessing in disguise 🙂...
    Need some more Java 8 interview questions...

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Thanks Abhishek🙂😃👍👍. Sure we will upload them soon

  • @bhuvanakuppusamy6933
    @bhuvanakuppusamy6933 2 ปีที่แล้ว +1

    Really All your videos are good and easy to understand. . Thankyou team....

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks Bhuvana🙂

  • @swapnilmishra697
    @swapnilmishra697 2 ปีที่แล้ว +1

    Please cover more java 8 programing question.
    Very well explained thanks alot

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure Swapnil we will do that. Thanks 🙂👍👍

  • @silpapremachandran6982
    @silpapremachandran6982 2 ปีที่แล้ว +1

    Thank you so much for such good contents. Looking forward for more such videos on JAVA8 programming.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks Silpa. We do have many of them covered here -
      th-cam.com/play/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy.html

  • @rajanid8
    @rajanid8 2 ปีที่แล้ว +1

    Wonderful explanation 👏 Thanks for all the efforts !!

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks 🙂🙂👍👍

  • @ravindracharyvadyarapu
    @ravindracharyvadyarapu 2 ปีที่แล้ว +2

    Nice explanation.. I have faced these questions in the interview. Can you also list employees in sorting order based on name and salary.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Thanks Ravindra. Sure we will include these too In same question 👍🙂😃

    • @ravindracharyvadyarapu
      @ravindracharyvadyarapu 2 ปีที่แล้ว

      @@CodeDecode I have used Comparator.comparing().thenComparing(). Please let us know if any alternate solution available.

    • @ajaykrishna441
      @ajaykrishna441 2 ปีที่แล้ว

      That question was already covered in this channel. Once go through all videos.

  • @slowstarter5720
    @slowstarter5720 2 ปีที่แล้ว +1

    Thank you for putting efforts in providing the awesome content with in detailed explanation & demo. As far as this video's concerned, usage of skip & limit as a combination is something that is missed I guess(which might be useful for getting nth highest salary ).
    Could you please make a tutorial or interview questions video(s) for MyBatis as well in near future.
    Thanks

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure thanks 👍🙂

    • @slowstarter5720
      @slowstarter5720 2 ปีที่แล้ว

      @@CodeDecode Hi.. are you maintaining all these material in GitHub or somewhere else ? If yes could please provide the link so that it will be easy for us(the viewers) to refer it quickly.
      Thanks

  • @komalagrawal5597
    @komalagrawal5597 4 วันที่ผ่านมา +1

    I have a question, For last problem what if some employee have the same salary. then how we can fetch ?

    • @harshavardhanpasumarthi4249
      @harshavardhanpasumarthi4249 3 วันที่ผ่านมา +2

      I too have the same doubt. Not only in the last case, In case of first 3 highest salaried employees also, we can't get expected output with limit and skip. How to overcome this problem. Please explain @CodeDecode

  • @karthikeyanrm3446
    @karthikeyanrm3446 2 ปีที่แล้ว +1

    Code decode Team - Because of your content even today I cleared interview of a very good company, have got so many offers. You guys are really awesome - no words to appreciate 🙂

  • @alok7485
    @alok7485 ปีที่แล้ว +1

    //Please explain how to Write Java 8 program to return word as a list value and its length as a key in descending sorting
    order from below sentence, -Input => String statement = "Hello World My name is Jane and I hate Mango Fruit";
    Output=> {5 = [“Hello”, “World”, “Mango”, “Fruit”], 4 = [“name”, “Jane”, “hate”],
    3 = [“and”], 2 = [“My”, “is”], 1 = [“I”]}

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      Pseudo code :
      Split string by space, create list from array of string.
      Open stream on list
      Group by string's length n values will become list of all strings of that length👍

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      That's pseudo code. If you want we will create a video on this👍

    • @alok7485
      @alok7485 ปีที่แล้ว

      @@CodeDecode Please provide complete code for this

    • @alok7485
      @alok7485 ปีที่แล้ว +1

      import java.util.Arrays;
      import java.util.List;
      import java.util.Map;
      import java.util.stream.Col­lectors;
      public class ReturnWordAsList {
      public static void main(String[] args) {
      String input = "Hello world my name is jane and I hate mango fruit";
      String[] split = input.split(" ");
      collect = Arrays .stream(split) .collect(Collectors.groupingB­y(String::length));
      System.out.println(collect);
      /* * output : * * {1=[I], 2=[my, is], 3=[and], 4=[name, jane, hate], 5=[Hello, world, mango, * fruit]} */ } }
      ====== Will the following program work ?

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      You don't have any IDE available with you?

  • @ambikabiradar1626
    @ambikabiradar1626 2 ปีที่แล้ว

    Using employee object find who have employee I'd is even and salary is greater than 50000 using java 8 features

  • @sharedme4471
    @sharedme4471 2 ปีที่แล้ว +1

    how much package i achieve(As a fresher java developer) if i watch your all video of java ?❓❓❓

  • @foodiegirldiya
    @foodiegirldiya 2 ปีที่แล้ว

    Hi, Your videos helped me alot during my interview. I have a question for you in streams, Please provide me the answer in the comment and also please do the videos for such questions.
    Ques: There is an Employee class with id, Name. Write a code using java 8 to replace the name of those employees with id 4 and collect them to a employee object

    • @user-pg2yp4oc6b
      @user-pg2yp4oc6b 7 หลายเดือนก่อน

      import java.util.Arrays;
      import java.util.List;
      import java.util.stream.Collectors;
      class Employee {
      private int id;
      private String name;
      public Employee(int id, String name) {
      this.id = id;
      this.name = name;
      }
      public int getId() {
      return id;
      }
      public String getName() {
      return name;
      }
      public void setName(String name) {
      this.name = name;
      }
      @Override
      public String toString() {
      return "Employee{" +
      "id=" + id +
      ", name='" + name + '\'' +
      '}';
      }
      }
      public class EmployeeExample {
      public static void main(String[] args) {
      List employees = Arrays.asList(
      new Employee(1, "John"),
      new Employee(2, "Jane"),
      new Employee(3, "Bob"),
      new Employee(4, "Alice"),
      new Employee(5, "Charlie")
      );
      List updatedEmployees = employees.stream()
      .map(employee -> {
      if (employee.getId() == 4) {
      employee.setName("NewNameForEmployee4");
      }
      return employee;
      })
      .collect(Collectors.toList());
      updatedEmployees.forEach(System.out::println);
      }
      }

  • @challaprashanthreddy9799
    @challaprashanthreddy9799 2 ปีที่แล้ว +1

    Hi code decode
    Just give us complete knowledge with java 8 intermediate functions how types are there and how to use them

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Every thing that you need is already covered. Please have a look at th-cam.com/play/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy.html

  • @user-oe9qv6my1x
    @user-oe9qv6my1x 6 หลายเดือนก่อน

    make interview question aws/gcp also

  • @Vithal_Nivargi
    @Vithal_Nivargi 2 ปีที่แล้ว +1

    Thank you good video pls make one more video

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure we will create it soon

  • @mrindian7422
    @mrindian7422 ปีที่แล้ว +1

    Thank you for such good explanation ❤❤

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      You're welcome 😊

  • @pulkitsrivastava4211
    @pulkitsrivastava4211 8 หลายเดือนก่อน

    Hello queen u dropped this 👑

  • @manindersingh6371
    @manindersingh6371 2 ปีที่แล้ว

    Thank you so much for this wonderful content. Your target was 500 like but its 625 now including mine. Really appreciated your hard work to clear the concept of java streams. Kindly make videos on kafka. There is no content available on youtube regarding that. Will help you as well as subscribers.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      sure maninder we will upload video on kafka in near future

  • @challaprashanthreddy9799
    @challaprashanthreddy9799 2 ปีที่แล้ว +1

    Hi code decode expecting a reply and a video for the following question
    How do different roles provided to different users like admin and others
    And how the username password validation is working and how to implement

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Answer to both is- spring security. Answer 1 - Role based authentication and authorization
      Answer 2-you can do this in y your custom spring security class which extend web security configuration adapter.
      Sure these are awesome topics. We will create videos on both👍👍🙂🙂

  • @rajkumarchilukuri878
    @rajkumarchilukuri878 2 ปีที่แล้ว +1

    Pls cover terminal and intermediate operations using stream with map,filter,flatMap,

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      sure rajkumar we will create it soon

  • @realcrikctetgame4475
    @realcrikctetgame4475 2 ปีที่แล้ว +1

    Good explanation but please keep video export quality good, it is hazy in big screen.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure. Thanks for getting this issue to our notice.

  • @sayanbiswas8847
    @sayanbiswas8847 2 ปีที่แล้ว +1

    Thanks for this. Helpful

  • @saradamohapatra452
    @saradamohapatra452 ปีที่แล้ว

    Please print non repeated characters in a string using Java 8 features

  • @akashchoudhary5895
    @akashchoudhary5895 ปีที่แล้ว +1

    List sortedList = employeeList.stream()
    .sorted(Comparator.comparingLong(Employee::getSalary))
    .limit(3)
    .collect(Collectors.toList());

  • @syedr16
    @syedr16 2 ปีที่แล้ว

    Thanks , explaind realy well..i was asked to get second highest .if i use limit(2)will that work can u explain on this please

  • @okeyh686
    @okeyh686 7 หลายเดือนก่อน

    are these questions asked for fresher java developer role in interview

  • @kumarrajakotakonda1351
    @kumarrajakotakonda1351 2 ปีที่แล้ว +1

    Thanks ton..only second maximum highest salary..

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      🙂🙂👍👍

    • @kumarrajakotakonda1351
      @kumarrajakotakonda1351 2 ปีที่แล้ว

      @@CodeDecode please make vedio maxby or minby and map and flatmap operations.. please

    • @praveenidea1152
      @praveenidea1152 2 ปีที่แล้ว

      Use limit (2).skip(1) you will get it

  • @ankurpatel7266
    @ankurpatel7266 ปีที่แล้ว

    If we have more than 5 properties then Can we sort more than 3 property of employees class ??

  • @mamatharao2127
    @mamatharao2127 2 ปีที่แล้ว +1

    Pls make more videos on java8 streams coding questions

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure Mamatha 🙂👍we will do that

  • @prasannakumar4811
    @prasannakumar4811 2 ปีที่แล้ว +2

    Please make a website for all your tutorial video's

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Sure prasanna things are in process. We will update once it will get created

  • @srini601
    @srini601 2 ปีที่แล้ว +1

    Please upload more java8 interview questions

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      sure srinivas we will upload it soon

  • @Rajshimishra123
    @Rajshimishra123 2 ปีที่แล้ว +1

    I got same question and I got rejected kash pahle video dakh lati

  • @Ravikumar-gj6qw
    @Ravikumar-gj6qw 2 ปีที่แล้ว

    what if i want only 3 rd highest salary , am i think like thing skip 2 and limit 1 right is this correct

  • @MsSomiljain
    @MsSomiljain ปีที่แล้ว +1

    Doing great Job Yashi :)

  • @geektechtalk6231
    @geektechtalk6231 2 ปีที่แล้ว +1

    Hi,
    Could you please share the PPT or doc
    used in the tutorials used in Spring Boot and microservices videos so that it could help in revision?
    Or let me know if you have uploaded it somewhere
    or can we get it by joining the membership?
    Thanks in advance

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Hello. Everything we covered is given in the description below . Anything else is needed?

    • @geektechtalk6231
      @geektechtalk6231 2 ปีที่แล้ว

      @@CodeDecode Thank you so much for your response. I am sorry but the details which I asked for microservices and Spring Boot PPT or Doc which are covered in those videos isn't mentioned in any of the videos description. It would you great if you could share PPT or doc for the same, it would help in revising for the interviews.

  • @ajaykrishna441
    @ajaykrishna441 2 ปีที่แล้ว +1

    I also face this type of coding challenge. They ask me to print all the employees whose salary is greater than 5th highest employee salary in list. So I answer this question.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Yepp it's commonly asked question Ajay 🙂👍

  • @himanshusekhar4779
    @himanshusekhar4779 2 ปีที่แล้ว +1

    This kind of questions can be asked pertaining to how may yrs of experience candidates?

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      From any candidate who had written java 8 in their resume Himanshu👍👍

  • @sureshkorrayi5321
    @sureshkorrayi5321 ปีที่แล้ว

    HI HOW WE MODIFY THE DATA BASED ON CONDTION LIKE BASED ON GRADE HOW WILL INCREASE SALARY 10 percentage..THANKS IN ADVANCE

  • @Daxbedivlogs
    @Daxbedivlogs 2 ปีที่แล้ว +1

    can we have microservices related content ? thanks in advance

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Sure Deepak. We will put more videos on microservices

  • @nandanhj7053
    @nandanhj7053 2 ปีที่แล้ว +1

    Thanks 👍

  • @rajarathinam1965
    @rajarathinam1965 2 ปีที่แล้ว

    Sorted.comparator how you use tell bro

  • @himanshuarya3335
    @himanshuarya3335 2 ปีที่แล้ว +1

    superb

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Thanks Himanshu 🙂🙂👍👍

  • @ankitgiri6874
    @ankitgiri6874 ปีที่แล้ว +1

    These are basic interview question based on java 8.

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      Java 8 Coding Interview Questions (Most Asked): th-cam.com/play/PLyHJZXNdCXsfcMboYwGoL6wKAFPxljz5W.html

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      Here you go Ankit

  • @amarthyaseshu683
    @amarthyaseshu683 2 ปีที่แล้ว +1

    👌

  • @pewpewtamil
    @pewpewtamil 2 ปีที่แล้ว

    Can I get the source code sis

  • @ssshanmugam4514
    @ssshanmugam4514 2 ปีที่แล้ว +1

    Please post more java 8 coding questions

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure Shanmugam 👍👍