Skip to main content

Posts

Showing posts from August, 2015

LDAP

Question : What is a Directory? Answer : When we think of a directory, we conjure images of telephone directories or address books. We use such directories to find information about individuals or organizations. For instance, I might thumb through my address book to find the phone number of my friend Jack, or skim through the telephone directory looking for the address of Acme Services. A directory server is used this way, too. It maintains information about some set of entities (entities like people or organizations), and it provides services for accessing that information. Of course, a directory server must also have means for adding, modifying, and deleting information, as well. But, even as a telephone directory is assumed to be primarily a resource for reading, a directory server's information is assumed to be read more often than written. This assumption about the use of a directory server is codified, or summarized, in the phrase "high-read, low-write". Cons

Collections JAVA

Collection Question:Comparable and Comparator? Comparable Comparator Comparable provides single sorting sequence. In other words, we can sort the collection on the basis of single element such as id or name or price etc. Comparator provides multiple sorting sequence. In other words, we can sort the collection on the basis of multiple elements such as id, name and price etc. Comparable affects the original class i.e. actual class is modified. Comparator doesn't affect the original class i.e. actual class is not modified. Comparable provides compareTo() method to sort elements. Comparator provides compare() method to sort elements. Comparable is found in java.lang package. Comparator is found in java.util package. We can sort the list elements of Comparable type byCollections.sort(List) method. We can sort the list elements of Comparator type   byCollections.sort(List,Comparator) method. Question: What is return type of compareTo? Answer