Advertisement
magrelu94

main.java

Aug 27th, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1. public class main {
  2.  
  3.     /**
  4.      * @param args the command line arguments
  5.      */
  6.     public static void main(String[] args) {
  7.         int tam = 5;
  8.         MeuItem itens[] =  new MeuItem[tam + 1];
  9.        
  10.         itens[1] = new MeuItem(1);
  11.         itens[2] = new MeuItem(3);
  12.         itens[3] = new MeuItem(4);
  13.         itens[4] = new MeuItem(5);
  14.         itens[5] = new MeuItem(2);
  15.        
  16.         //Ordenacao.selecao(itens, tam);
  17.        
  18.         for(int i = 1; i <= tam; i++){
  19.             System.out.println(itens[i].chave);
  20.         }
  21.        
  22.         Ordenacao ord = new Ordenacao();
  23.         ord.shellsort(itens, tam);  
  24.        
  25.         for(int i = 1; i <= tam; i++){
  26.             System.out.println(itens[i].chave);
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement