テキストフィールドにテキストを入力して a を選択し、a が利用できない場合は b を選択し、最後に情報を送信したいと思います。私はこれらのコードを書いただけで、次に何ができるかわかりません。
URL page_1 = new URL("https://google.com.hk");
HttpURLConnection urlconnection = (HttpURLConnection) page_1.openConnection();
DataOutputStream data_out = new DataOutputStream(urlconnection.getOutputStream());
DataInputStream data_in = new DataInputStream(urlconnection.getInputStream());
urlconnection.setDoInput(true);
urlconnection.setDoOutput(true);
System.out.println(data_out);
System.out.println(data_in);
System.out.println(urlconnection);