Explain Linked HashSet
Java LinkedHashSet class is a Linked list and Hash table implementation of the Set interface. It contains unique elements same as a HashSet. Linked HashSet in Java also provides optional set operations that can maintain the order of insertion.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the default value stored in Local Variables?
What is the difference between error and an exception?
What is a final class in java?
How do you avoid global variables?
interface X{ void m1(); void m2(); } class Child2 extends Object implements X { public void m1(){ System.out.println("Child2 M1"); } public void m2(){ System.out.println("Child2 M2"); } } public class ParentChildInfterfaceDemo { public static void main(String[] args){ X x = new Child2(); X x1 = new Child2(); x.m1(); x.m2(); x.equals(x1); } } Will the above code work? If yes? Can you please explain why the code x.equals(x1) will work as the equals method is called on interface reference vaiable?
What are 3 data types?
What are the concepts of 'OOPS'?
can you create interface instance ?
What is the default value of byte datatype in java?
What is the difference between stringbuffer and stringbuilder class?
Why do we need singleton?
Can a class be private or protected in java?