Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. public String imprimeExpressao(){
  2.        
  3.         if (this.getFilhoEsquerdo() == null && this.getFilhoDireito() == null){
  4.             return this.getValor();
  5.         } else {
  6.              return "(" + this.getFilhoEsquerdo().imprimeExpressao() + this.getValor() + this.getFilhoDireito().imprimeExpressao() + ")";
  7.         }
  8.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement