The type org.web3j.crypto.WalletUtils is not accessible

Hello community,

I am getting the error “The type org.web3j.crypto.WalletUtils is not accessible”.

I am trying to create a new wallet. This is my code.

File walletDirectory = new File("…/fileDirec");
Bip39Wallet walletName = WalletUtils.generateBip39Wallet(password, walletDirectory);
Credentials credentials = WalletUtils.loadBip39Credentials(password, walletName.getMnemonic());
String accountAddress = credentials.getAddress();
ECKeyPair privateKey = credentials.getEcKeyPair();
String seedPhrase = walletName.getMnemonic();
System.out.println(“Account Details:”);
System.out.println("Your New Account : " + credentials.getAddress());
System.out.println("Mneminic Code: " + walletName.getMnemonic());
System.out.println("Private Key: " + privateKey.getPrivateKey().toString(16));
System.out.println("Public Key: " + privateKey.getPublicKey().toString(16));

Thank you in advance.