Advertisement
nRikee

Examen pràctiques PRG (pract5)

Jun 1st, 2012
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. public int noRecordeComEsDeia(String s){
  2.     int aparicions = 0;
  3.     NodeCnc ant = null;
  4.     NodeCnc aux = prim; // O com hajes nomenat el NodeCnc de la classe Concordanca
  5.    
  6.     while( aux!=null ){
  7.         if( aux.pal.compareIgnoreCase(s) ) aparicions += aux.numLins.talla();
  8.        
  9.         ant=aux;
  10.         aux=aux.seguent;
  11.     }
  12.     return aparicions;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement