- What is a predicate in Java? Can you throw an exception from a predicate? Its a functional interface which accept one argument and produce a result. (solution)
- Explain fail fast and fail safe iterators. (solution)
- Implement stack using Queue.(solution)
- Write a program to reverse a linked list. (solution)
- Write a program to return all characters from a string which appeared more than once. (solution)
- Generate the Fibonacci recursively and iteratively in Java. Explain the complexities for both solutions.(solution)
- Swap the values between two elements without using a third element.
- Generate all anagrams of a String.(solution)
- How PriorityQueue works internally in Java?
- Difference between TreeSet and PriorityQueue in Java.
- Given a string like ABC find all possible distinct permutations, e.g:ABC,BAC,CAB etc.
- Sort array elements in place making even and odd number together.
- Write a function to return the maximum difference between two elements in an array.
- I have an array of million integers. I want to sum it efficiently. How would you do it without using Java 8 parallel streams? (Hint: use forkjoinpool)
- Some Basic Core Java Interview Questions related to Polymorphism and try catch(solution)
- Write a method to find the first non-repeating character from a String? (solution)
- We have a balanced Binary Tree, am trying to throw a light from a particular node, which all nodes will be visible?(solution)
- What will happen if we return a constant number from overriden hashCode() method?
- What will happen if we return constant number from overriden hashCode() method and false from equals()?
- What will happen if we return constant number from overriden hashCode() method and true from equals()?
Pages
▼
No comments:
Post a Comment