My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.lineadecodigo.java.util.collections;

import java.util.Collections;
import java.util.Vector;

/**
* @file OrdenarVectorAlfabeticamente2.java
* @version 1.0
* @author Linea de Codigo (http://lineadecodigo.com)
* @date 3/enero/2010
* @url http://lineadecodigo.com/java/ordenando-alfabeticamente-con-case_insensitive_order/
* @description Utilizar una ordenación alfabética mediante el campo String.CASE_INSENSITIVE_ORDER
*/

public class OrdenarVectorAlfabeticamente2 {


public static void main(String[] args) {


Vector<String> miVector = new Vector<String>();
miVector.add("Victor");
miVector.add("julio");
miVector.add("amaya");

Collections.sort(miVector,String.CASE_INSENSITIVE_ORDER);

for(String sElemento: miVector){
System.out.println(sElemento);
}

}

}

Change log

r213 by vcuervo on Jan 3, 2010   Diff
Ordenación alfabéticamente mediante el
campo CASE_INSENSITIVE_ORDER
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 860 bytes, 34 lines
Powered by Google Project Hosting