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