For example, take English dictionary it contains data in following format.
god:Any supernatural being worshipped as controlling some part of the world or some aspect of life or who is the personification of a force
apple:Fruit with red, yellow or green skin and sweet to tart crisp whitish flesh
applaud:Clap one's hands or shout after performances to indicate approval
actual:Presently existing in fact and not merely potential or possible
I want to store key/value pair without using any Collections framework classes.
sample program
My Question is, Is there any better to handle key/value pair without using any collection framework classes?
Why don't you want to use the Collection framework? This sounds like the job for a Map. By deciding to not use the Collection framework you are not even considering proper solutions like HashMap, TreeMap or even java.util.Properties. The latter extends Hashtable which is a Map implementation so part of the Collection framework.
Gangadhararao Bommasani wrote:
However, Is there a way to handle key/value without depending on collection Framework?
Sure. Write your own. Have a node class that refers to a key and value. This can be held in an array, and managed, like arraylist. This node can contain references to other nodes, and managed, like linkedlist. Or you can have an array of linked lists, like hashmap, etc. etc. etc.