As list can return the elements in which order they get stored.
But in case of Set if I store the elements in an order the returning elements do not maintain the same order.
[code=text]Actually here is my properties file.
like this.....
abc=123
debasis=345
hello=hello world
debasis=i luv movie
..
.
.
.[/code]
Now what i am doing ....
[code=java]
Properties props = new Properties();
props.load("c:/xxx.properties" );
Set keys = props.keySet();
[/code]
Now i want the iterate the keys in which order they got stored.
How?
But in case of Set if I store the elements in an order the returning elements do not maintain the same order.
[code=text]Actually here is my properties file.
like this.....
abc=123
debasis=345
hello=hello world
debasis=i luv movie
..
.
.
.[/code]
Now what i am doing ....
[code=java]
Properties props = new Properties();
props.load("c:/xxx.properties" );
Set keys = props.keySet();
[/code]
Now i want the iterate the keys in which order they got stored.
How?
Comment