Advertisement
ArcozeloMen

Token

Mar 22nd, 2017
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package pln;
  7.  
  8. import static javax.swing.UIManager.get;
  9.  
  10. /**
  11. *
  12. * @author a29365
  13. */
  14. public class Token {
  15.  
  16. public static void main(String[]args){
  17. Sentence s=new Sentence("O gato comeu o bolo");
  18. }
  19.  
  20. String t;
  21.  
  22. public Token(String t){
  23. this.t=t;
  24.  
  25. }
  26.  
  27. public String toString(){
  28.  
  29. String s=get(0).toString();
  30. for(int i=1;i<size();i++){
  31. String w =get(i).toString();
  32. if(Character.isLetter(w.charAt(0)))
  33. s=s+" "+w;
  34. else
  35. s=s+w;
  36.  
  37. }
  38. return s;
  39.  
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement