Pessoal boa noite,
Como eu faço pra disparar um método que eu implementei dentro de outro método?
O método está na interface, mas foi implementado em outra classe.
Segue a interface:
import java.rmi.*;
public interface ChatInterface extends Remote {
public void juntar(Notificar n, String name) throws RemoteException;
public void conversar(String name, String s) throws RemoteException;
public void deixar(Notificar n, String name) throws RemoteException;
public void baralho () throws RemoteException;
public carta distribui (String name) throws RemoteException;
public void embaralhar () throws RemoteException;
public void trocar () throws RemoteException;
public void encerrar () throws RemoteException;
public void inicia_partida () throws RemoteException;
Segue o método implementado:
public void embaralhar () throws RemoteException{
atual = 0;
for ( int prim = 0; prim < carta.length; prim++ )
{
int seg = aleatório.nextInt( quantidade );
carta temp = carta[ prim ];
carta[ prim ] = carta[ seg ];
carta[ seg ] = temp;
}
serverList.decCounter();
}
}