Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.


Please wait...

Technical Interview Questions and Answers :: Java

    Question :: 11
    What is an Iterator ? How do you traverse through a collection using its Iterator?
    Answer:

    Iterator allows to traverse the collection and also it has methods which enables to obatin or remove elements. ListIterator adds the feature of traversing the list bi-directionally, also modify the elememts.



    Eg.: Iterator itr = al.iterator();



                while(itr.hasNext()) {}

    Please Login First :
    Question :: 12
    What is the List interface?
    Answer:

    List is subinterface of collection interface 



    List is objects can be stored in sequencelly order 



    List objects can be stored in index or access by its index



    List is preserve  the order of insertion.



    List duplicate objects can be stored and also null insertion is allowed.



    list is 3 implemention classes



    1.ArrayList Class



    2.LinkedList Class



    3.Vector Class

    Please Login First :
    Question :: 13
    What are the advantages of ArrayList over arrays ?
    Answer:

    No Discussion on this question yet!

    Please Login First :
    Question :: 14
    What is the Set interface ?
    Answer:

    A set is a collection that cannot contain duplicate elements. Set has it's implementation in various classes like HastSet, TreeSet, LinkedHashSet. Set has only methods that are inherited from Collection and adds the restrictions to prohibit duplicate elements.

    Please Login First :
    Question :: 15
    What is a Map ? About HashMap.
    Answer:

    Map contains values on the bais of keys.



    Keys=  value key.



    These keys are known as entry.



    HasMap classes implements the Map interface by using Hash Table.

    Please Login First :

    Tags:No Tags on this question yet!

    Question :: 16
    What is the Comparable and Comparator interface ?
    Answer:

    Java Comparable interface is used to order the objects of user-defined classes. It has compareTo(object) method and is available in jva.lang package.



    Java Comparator interface is available in java.util package. It has two methods compare(Object obj1, Object obj2) and equals(Object element).

    Please Login First :

    Tags:No Tags on this question yet!

    Question :: 17
    What is immutable object? Can you write immutable object?
    Answer:

    An immutable object cannot be modified after it has been created. Also can be said unchangeabe object.

    Please Login First :

    Tags:No Tags on this question yet!

    Question :: 18
    What is the difference between creating String as new() and literal?
    Answer:

    When 'new String()' is used, it creates a new string object in the heap memory and as when literal is used, it may return an existing object from the string pool, it exists else creates a new object.

    Please Login First :

    Tags:No Tags on this question yet!

    Question :: 19
    What is difference between StringBuffer and StringBuilder in Java ?
    Answer:

    StringBuffer has same objects as StringBuilder, but each method in StringBuffer is synchronized,i.e., it's thread safe. That's why StringBuilder is faster than StringBuffer.

    Please Login First :

    Tags:No Tags on this question yet!

    Question :: 20
    What is Singleton?
    Answer:

    Singleton class is a design pattern where it allowes creating only one object per class



    we should define constructor as private it object creation is restricted



    we should use static method this method is returen object of same class only

    Please Login First :