It's not considered best practice to reuse bitcoin addresses (what you call 
wallets) for change or any other reason, this is why by default bitcoinj 
(and similar libraries) create new addresses for change transaction 
outputs. If for some reason you still want to do this you'd need to 
manually create your own Transaction object with your change output to the 
same address as your input. Also keep in mind that you can have multiple 
inputs so you'd need to decide which one to use for your change. But really 
you should always use a new address for your change as bitcoinj already 
does by default.

https://en.bitcoin.it/wiki/Address_reuse

On Wednesday, March 6, 2019 at 10:06:26 PM UTC-8, jh...@seekerslab.com 
wrote:
>
> For example
>
> Think , My A wallet have 1 BTC.
>
> If i try to send 0.6 BTC from A wallet to another Wallet, my bitcoinj 
> generate new B wallet. and change coin 0.4 will be sent to B wallet
>
> How can i send coin from specific address? and how can i keep change in my 
> A wallet ?
>
> Thank to read. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to