They have created streams so that we don't have to use our brains to think on the logic and simply learn the infinite number of functions and try to find a way to use them. Streams api is completely useless, I can't think complex logic in streams. Streams are not made for humans , they are made for machines.
thank you sir for solving this problem can u please explain resolution for hibernate mapping problem1 .properties not found 2.mapping file not found etc or else please do hibernate tutorial for us
hi i am having error please check\\ public interface Animal { public void speak(String words); } public class Main { public static void main(String[] args) { Animal a=(p)-> {System.out.println(p); a.speak("this is me"); //here is error }; } }
Hi thanks for this informative vdo, but can you please make vdo for if two different application running in different port. How to run and stop the server???
Nice catch, I just made the small fix changed to: if (c1 == c2){ Meta.temp++; } else { Meta.temp = 1; // reset counter } if (Meta.temp > Meta.total){ Meta.total = Meta.temp; Meta.aChar = c1; } return c2;
I tried this code and it only fetches a single employee getting highest salary from each department. Even though there are multiple employees getting same highest salary. Can you write a code to fetch all the employees from each department getting highest salary. for example 2 employees from HR department gets the same highest salary 10000. So in output I want both the employee details.
IMO, the best metaphor which fits the problem is to make a cake and to go to the grocery N times for buying each ingredient one by one. Would we really do that so? LOL Better to learn a pattern to write entities and queries to prevent performance issue right now ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-mJrrJEIQxOQ.html
Can you write a program to get top 5 salaries and Employees name given they have Employee ID , Employee NAme , Employee Department , Employee Salary , Employee isActive boolean true property. Please explain in easy words and execute and write program using java 8 functional programming features and streams to Pick only the TOP 5 salary and top 5 Employee Name only. I tried with this following approach but interviewer rejected me and i am not able to solve. Please explain how to write the solution because i am crying so much. public class Employee { //id,name,department,salary,isActive; //Find out top 5 IT department, <50 K, isActive='true' public static void main(String[] args) { // TODO Auto-generated method stub // topEmployeeList = allEmployeeList.stream() .filter(department=='IT') .filter(salary<50000) .filter(isActive==true) .collect(groupingBy(e->e.department, collectingAndThen(maxBy(comparingInt(e->e.salary))))); } }
Streams are waste of time. For interviews, I have to byheart the code for different programs and I can't simply think in terms of streams. I want to personally punch the java creators for creating streams.
How to populate vectors records which has no data inside with default value. I have a vector description . So times this array is no populated or has no data inside . This case the root level ID values are not being extracted