Welcome to OStack Knowledge Sharing 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 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...