Комментарии:
We want more this kind of videos.
ОтветитьThanks for the awesome tutorial! I was asked the following question in MPhasis interview. Please help with the solution:
Write a program to get the biggest continuous subarray.
e.g. we have an array [1,3,4,5,6,9,10,12], we need to get 3,4,5,6.
I was asked in a interview How to remove adjacent duplicates of a string in java8
Ответитьthis is really good video for those who are lagging in doing programming with corejava.... if any one practice this and learn doing on their own..they ll start become stronger and stronger intheir coding skillls... thanks for the good work..
Ответитьcan you please make video on functional interface with recursive?
Ответитьgreat
ОтветитьThanks
ОтветитьKindly make a video on fetching Arrey Index of top 4 records from millions of record in a database.
ОтветитьIn output we got the map<S,N> has key salary and value name, but if I want same map<N,S> in which key is name and salary is value is it possible?
ОтветитьFirst group it to avoid complexity
// Group employees by salary
Map<Double, List<Employee>> employeesBySalary = employees.stream()
.collect(Collectors.groupingBy(Employee::getSalary));
// Sort salaries in descending order
List<Double> sortedSalaries = employeesBySalary.keySet().stream()
.sorted(Comparator.reverseOrder())
.collect(Collectors.toList());
// Find and display employees for each group
for (Double salary : sortedSalaries) {
System.out.println("Salary: " + salary);
List<Employee> employeesWithSameSalary = employeesBySalary.get(salary);
employeesWithSameSalary.forEach(emp -> System.out.println(" - " + emp.getName()));
private static Entry<Double, List<String>> getnthHighestSalaryEmployeeName(Map<Double, List<String>> mappedWithSalary, Integer n) {
return mappedWithSalary.entrySet().stream()
.sorted(Collections.reverseOrder(Map.Entry.comparingByKey()))
.skip(n - 1)
.findFirst()
.orElse(null);
}
And also debugging process in realtime project chey bro series
ОтветитьBro realtime project implement action series chey bro
ОтветитьI have made it by the following way Employee nthHighestEmployee = employees.stream()
.sorted(Comparator.comparingDouble(Employee::getSalary).reversed()).skip(n - 1).findFirst()
.orElse(null);
Optional<List<Employee>> secondHighestEmployee = employees.stream()
.collect(Collectors.groupingBy(Employee::getSalary, TreeMap::new, toList()))
.entrySet()
.stream()
.skip(n-1)//
.map(Map.Entry::getValue)
.findFirst();
System.out.println(secondHighestEmployee);
Thanks for good content. Hope you keep sharing on((:
ОтветитьExperience ??
ОтветитьExcellent tutorial Bro!! Please keep post solving new problems!!
ОтветитьHi ,I have list of employee objects I just want sort my employee list based on name in ascending order age in descending order ,salary in ascending order at a time
How we make this combine sort ?
Sir, I cant thank you more, today I had 2nd technical round with TechM, the interviewer asked the same question, that how you will group male and female on the basis of dept. but you are getting the Dept. name as a method argument. I randomly watched this video 3-4 days back and today when interviewer asked this question, I could only think about this video and provided him the solution in a minute.
ОтветитьSir, I cant thank you more, today I had 2nd technical round with TechM, the interviewer asked the same question, that how you will group male and female on the basis of dept. but you are getting the Dept. name as a method argument. I randomly watched this video 3-4 days back and today when interviewer asked this question, I could only think about this video and provided him the solution in a minute.
ОтветитьI have upcoming interview 2nd round on Friday. I know backend spring boot but am not aware of java 8 and all crucial features and usecases of it, i am told it will be asked for sure.
Can you please suggest me few sources to understand everything about java 8 from scratch?? Or best make a small playlist if possible.
Humble request! Could be Life changing for me!
Map<String,Integer> dataMap = new HashMap<>();
dataMap.put("Bharat",10000);
dataMap.put("Ram",1200);
dataMap.put("Laxman",1600);
dataMap.put("Ravan",4500);
dataMap.put("Lav",5230);
Map.Entry<String, Integer> nthHighest = dataMap.entrySet().stream()
.sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))
.skip(2)
.findFirst()
.get();
System.out.println(nthHighest); //Can be done this way also
Hi bro.. ur videos are more clear. Are you working in software company?
ОтветитьThank you
ОтветитьGood one brother
ОтветитьIf I'm passing num value gt than size of sorted list, it will fail at get(index). What we can do in that case on streams?
ОтветитьGood video bro. Please make a more videos on java8 interview questions
Ответитьsuperb content
ОтветитьSir I LRU and LFU cache using LinkedHashMap please. I failed epam interview because of LFU cache.
ОтветитьAmazing videos for java techies.
ОтветитьThank Your very Much sir. Many programmers are learn more knowledge by yours videos.
ОтветитьNice way of delivering such complicated looking problem.
ОтветитьCan you make an real example of Optional where use some frequent and important methods like OrElseGet() etc
ОтветитьEven if you cant...no worries..thanks for your efforts in making these videos that are of so much help
ОтветитьCan you please help on a interview question where they asked to create a person class that has some fields like id, name, address, age etc and there can be 100+ such field in person class.
We need to write a program to sort the person data using some dynamic criteria, like sample criteria can be
Id only
Id+ name
Name onky
Age onky
Id+name+age
And so on
Can you help me on this..
She suggested to use reflection api getdeclaredfield method and getproperty to solve yhis...which i cud not relate to
Thanks Basanth.Nice Video. God bless you.
ОтветитьBig thanks from Africa
ОтветитьAfter watching these kind of videos from you ...i am just thinking how some one like you❤ got this much of depth knowledge in java ... could you please explain me in one word??
ОтветитьCan you make video on how to switch from service based company to product based company?
ОтветитьExcellent, plz bring such new types of java coding questions in your upcoming videos...
ОтветитьWhat a useful content and example. Thanks for sharing
ОтветитьGood one ❤
Ответить🙏👍
ОтветитьNice incremental way of teaching streams in general.
ОтветитьAwesome 👍
ОтветитьSir please tell me how extract Text, table, images data from pdf using java. I am able to extracting text but remaining things how to get please tell me any solution
Ответить