The name servers of a domain are stored in the NS record. If you are able to get the MX record finding the name servers is no different.
Borrowing the example given in dnsjava documentation for listing the MX records:
Record [] records = new Lookup("gmail.com", Type.NS).run();
for (int i = 0; i < records.length; i++) {
NSRecord ns = (NSRecord) records[i];
System.out.println("Nameserver " + ns.getTarget());
}