1)Write an SQL query to fetch the second highest salary from an employees table 2)Write a Java 8 program to remove duplicate characters from a String while keeping original order and case-sensitive.
Utilisateur anonyme
1] SQL Query – Second Highest Salary Explanation: This query first finds the highest salary in the table, then gets the maximum salary that is less than that highest one. So it returns the second biggest salary value 2]Java 8 – Remove Duplicate Characters (Case-Sensitive) Explanation: chars() converts the String into character stream LinkedHashSet is used in filter to store only unique characters while preserving order Finally, the characters are joined back into a String using Collectors.joining() Because it’s case-sensitive, a and A are treated as different characters.