Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package pln;
- import static javax.swing.UIManager.get;
- /**
- *
- * @author a29365
- */
- public class Token {
- public static void main(String[]args){
- Sentence s=new Sentence("O gato comeu o bolo");
- }
- String t;
- public Token(String t){
- this.t=t;
- }
- public String toString(){
- String s=get(0).toString();
- for(int i=1;i<size();i++){
- String w =get(i).toString();
- if(Character.isLetter(w.charAt(0)))
- s=s+" "+w;
- else
- s=s+w;
- }
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement