Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.3k views
in Technique[技术] by (71.8m points)

java map赋值报错

 Map <String,String>headers = new HashMap<String,String>();
    headers=new unitting().headers();
package utils;

import java.util.HashMap;
import java.util.Map;

public class unitting {
    public long khronos = ((int) (System.currentTimeMillis() / 1000));
    public Map<String, String> headers()
    {
        Map Headers = new HashMap();
        Headers.put("authority","webcast.amemv.com");
        Headers.put("scheme","https");
        Headers.put("accept-encoding: ","gizp");
        Headers.put("response-format","protobuf");
        Headers.put("passport-sdk-version","18");
        Headers.put("sdk-version","2");
        Headers.put("cookie","odin_tt=005d7559c7953e970d3938a55d005402cdcb53ac5bf2094986b8ebcdf37b0894b211efff588e8fd187251c4fe3f90f05a73b9a3495327fc3823946582a0542f3; install_id=369400941537578");
        Headers.put("x-khronos",khronos);
        Headers.put("user-agent","okhttp/3.10.0.1");
        return Headers;

    }
}

headers=new unitting().headers(); 这里直接map 复制报错 这是为啥


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

这难道就是传说中的机器人?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...