In JavaScript SDK we have method isValidEd25519PublicKey
for Stellar address validation. But in Java SDK there is no such method.
How can I validate Stellar address with Java SDK?
You can use StrKey.decodeStellarAccountId()
wrapped with a try-catch block. If the expression throws an exception, the account id is invalid.