Top of the technical interview question in IT companies.This question generally for 1-3 years experience java or android developers.  Here is question understating. String input = “Eyehunt website java”; String output = “java website Eyehunt”; There is several way to solve this problem : 1. Using split method and convert string into array then arrange […]

Read More →

This is most common questions asking now day to Android ,Java developers and technical interviews. There is several different ways to Reverse string. Here is example for better understanding : Original String : “Hello” Revers String : “olleH” Original String : “My name is rohit” Revers String : “tihor si eman yM” Take String form […]

Read More →

How to read text from console is very important to java developer know.Its very basic part of core java.

 

Read More →

9 key interfaces of collection framework:  1. Collection Interface : If we want to represent a group of individual objects as a single entity then we should go for collection. Collection interface defines the most common methods which are applicable for any collection object. For ex:- Add Object Remove Object Contains() In general collection interface […]

Read More →

List(I) Interface: Contains all the methods of collection and has its own method. List is the child interface of collection. If we want to represent a group of individual objects as a single entity where duplicates are allowed and insertion order preserved then we should go for list. Legacy classes (vector and stack):-Classes coming from […]

Read More →

Stack Class : It is child class of vector It is specially designed class for last in first out order(LIFO) CONSTRUCTOR Stack s = new stack(); Operations: push(Object o) pop() offset peek()           s.search(A) //3 s.search(Z) ;//-1     Methods: Object push(Object obj):-For inserting an object to the stack. Object pop():-To […]

Read More →

Vector Class :  The underlying datastructure is resizable array or growable array.  Insertion order is preserved.  Duplicates objects are allowed.  Heterogeneous objects are allowed.  Null insertion is possible.  Vector implements Serializable, Cloneable interfaces and Random Access interfaces.  Vector is the best choice if our frequent operation is retrieval.  Linked List is the worst choice if […]

Read More →

ArrayList LinkedList 1. It is the best choice if our frequent operation is retrieval. 1. It is the best choice if our frequent operation is insertion and deletion in the middle. 2. ArrayList is the worst choice if our frequent operation is insertion or deletion in the middle. 2. LinkedList is the worst choice if […]

Read More →

LinkedList class :  The underlying datastructure is Double Linked List.  Insertion order is preserved.  Duplicates are allowed.  Heterogeneous objects are allowed.  Null insertion is possible.  Linked List implements serializable and cloneable interfaces but not Random Access interfaces.  Linked List is the best choice if our frequent operation is insertion or deletion in the middle.  Linked […]

Read More →

ArrayList class :  Resizable Array or growable array.  The underlined datastructure resizable and growable array.  Duplicates are allowed.  Insertion order is preserved.  Heterogeneous objects are allowed(Except Tree Set and Tree Map everywhere heterogeneous objects are allowed).  Null insertion is possible. CONSTRUCTOR: ArrayList l = new ArrayList():- Creates an empty ArrayList object with default initial capacity […]

Read More →