Como declaro String[]?

4 respostas
D

Fala galera :smiley:

Como que eu posso criar outras ‘lists’ e declarar que nem esse xemplo:

public String[] getRelationshipAttributes() {
        return new String[] {"softwareFornecedor"};


    }

Como q eu adiciono softwareDistribuidor??

[]'s

4 Respostas

B
public String[] getRelationshipAttributes() {
         return new String[] {"softwareFornecedor","softwareDistribuidor"};
 
 
     }

Não é isso?

Marcel_Horner

Ou se preferir tem essa forma pior:

public String[] getRelationshipAttributes() {
        String[] str = new String[2];
        str[0] = "softwareFornecedor";
        str[1] = "softwareDistribuidor";
        return str;
    }

:stuck_out_tongue:

D

haahha quantas maneiras!! :smiley:

Fico com a do segundo amigo…é mais fácil :wink:

Valew a todos que responderam!!

[]'s

I

ou se preferir ainda tem essa forma

public String[] getRelationshipAttributes() {
         String[] str = new String[2] {"softwareFornecedor","softwareDistribuidor"};

          return str;
     }
Criado 31 de julho de 2006
Ultima resposta 31 de jul. de 2006
Respostas 4
Participantes 4