Preciso fazer uma operacao usando 2 variaveis, mas cada variavel está em uma classe diferente. Ex:
public static Emprestimo NovoEmprestimo (ArrayList<Emprestimo> listaemprestimo) throws ParseException {
Emprestimo l = new Emprestimo();
//codigos aqui
int devolucao = Integer.parseInt(formato.format(formato));
}
public static void EncerrarEmprestimo(ArrayList<Emprestimo> listaemprestimo) throws ParseException {
Emprestimo l = new Emprestimo();
//codigos aqui
int encerrar = Integer.parseInt(formato.format(formato));
E então preciso fazer:
int multa;
multa = encerrar - devolucao;
Como proceder?