How can I generate public address from an xpub key in Java? I have an xpub key with which I want to generate all addresses which have been used or will be used and then find out the keys which have balance.

Here's a sample xpubkey with balance- xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz
I have to deserialize xpub key then use its derivation path to get a child path or normal key. From a normal key, it is easy to convert the public key to address.
You can refer to this source code.
https://github.com/tatumio/tatum-java/blob/master/src/main/java/io/tatum/wallet/Address.java#L24
Thanks