package conc;
import java.net.URL;
import java.net.URLConnection;
public class Test{
public static void main(String[] args) throws Exception
{
final String USERNAME = "[email protected]";
// This is only a sample. Hard coding passwords in source files is a bad practice.
final String PASSWORD = "abc";
URL url = new URL("https://books.zoho.com/app#/contacts");
URLConnection urlc = url.openConnection();
urlc.setRequestProperty("Content-Type", "application/json");
urlc.setDoOutput(true);
urlc.setRequestProperty("Method", "GET");
urlc.setAllowUserInteraction(false);
// final String URL = "https://books.zoho.com/app#/contacts";
}
}
這是我的代碼,它說我的用戶名,密碼沒有使用。用戶名和密碼的java代碼
是的,這條消息對我來說很有意義。 –
歡迎使用Stack OverFlow。消息是正確的,你沒有在你的程序中使用用戶名和密碼。 – Maverick
只是來自IDE的友好提醒,如果你願意,可以忽略它。 – PWC