在这里,公共意味着访问修饰符,如果您使用公共,您可以在类之外访问该方法。您也可以使用私有、默认和受保护的关键字来代替公共。这是了解这里的好链接
void means the return type in here you not return anything that's why use void if you need to return integer value you have to use int instead of the void key word.
eg - public int getData(){} but if you specify the return type you have to return value.
in here set means method name it is not a key word. but in the java to set some values we use set word as an example public void setName(){} like wise.
(String s, Integer value) these are the parameters if you need to call that method you have to pass to objects of the specified classes. in here you have to pass string value and integer value. eg - set("Secret",1);