How to size in bytes for a transaction using BitcoinJ The calculation of a transaction fee uses fee/kb. So how do I get the size in bytes for a transaction using BitcoinJ?

SendRequest req = SendRequest.to(address, value);

req.feePerKb = Coin.parseCoin("0.0000100");

Wallet.SendResult result = kit.wallet().sendCoins(req);
You cannot know the size in bytes of a transaction without knowing the inputs to the transaction. Just knowing the amount you want to transfer and just the output does not tell you anything.

Using the sendCoins() method and setting feePerKb in your SendRequest should create a transaction that pays the specified fee rate. If you want to get the transaction details after you send, the SendResult that you get has a field named tx which is a Transaction object. You can then get the necessary information from there.

If you want to know the size before you send, then you need to craft the transaction yourself as sendCoins() will automatically create and send the transaction for you.