### Question:
Address implements Serializable, Comparable<Address> { @Override public String toString() { if (_address == null) { byte[] addressBytes = new byte[1 + 20 + 4]; addressBytes[0] = _bytes[0]; System.arraycopy(_bytes, 0, addressBytes, 0, NUM_ADDRESS_BYTES); Sha256Hash checkSum = HashUtils.doubleSha256(addressBytes, 0, NUM_ADDRESS_BYTES); System.arraycopy(checkSum.getBytes(), 0, addressBytes, NUM_ADDRESS_BYTES, 4); _address = Base58.encode(addressBytes); } return _address; } Address(byte[] bytes);  Address(byte[] bytes, String stringAddress); static Collection<Address> fromStrings(Collection<String> addresses, NetworkParameters network); static Address[] fromStrings(String[] addressStrings); static String[] toStrings(Address[] addresses); static Address fromString(String address, NetworkParameters network); static Address fromString(String address); static Address fromP2SHBytes(byte[] bytes, NetworkParameters network); static Address fromStandardBytes(byte[] bytes, NetworkParameters network); boolean isValidAddress(NetworkParameters network); boolean isMultisig(NetworkParameters network); byte getVersion(); byte[] getAllAddressBytes(); byte[] getTypeSpecificBytes(); @Override String toString(); String getShortAddress(); String getShortAddress(int showChars); @Override int hashCode(); @Override boolean equals(Object obj); static Address getNullAddress(NetworkParameters network); @Override int compareTo(Address other); String toMultiLineString(); String toDoubleLineString(); NetworkParameters getNetwork(); static final int NUM_ADDRESS_BYTES; static final Function<? super String,Address> FROM_STRING; }### Answer:
@Test public void toStringTest() { InMemoryPrivateKey priv = new InMemoryPrivateKey(RANDOM_SOURCE); PublicKey pub = priv.getPublicKey(); Address addr = pub.toAddress(NetworkParameters.productionNetwork); System.out.println(addr.toString()); }