I'm missing how this is a
Java question, let alone Advanced.
The obvious answer is you use a phone to USB cable. But I'm assuming you want something more specific.
If you want to program your phone, you need to get the API or developers kit for the phone. Some use java, some use other languages. I don't know of any universal development environment for them.
Other than simple browser pages and forms.