If you are using the
CommandClient you can
submitAndWaitForTransaction, which returns a
Transaction object that represents the result of the command you submitted, which in turn contains all the persistent events, including contract creations with their contract identifier. If you are interested in seeing the full transaction, including transient and non-consuming events you can use the
submitAndWaitForTransactionTree method, which returns
TransactionTrees for your command.
If you are using a mix of the
TransactionClient the latter offers methods to read both
TransactionTrees for the relevant commands you submitted.
You can read more about all of these in the reference documentation for the Java bindings (here for version 1.14.0).