Are these method window specific?

I created multiple window,but I’m confused with some method whether it’s specific to each window or is it general…
1)GLFW.glfwSwapInterval();
2)GL.createCapabilities();

Do I call both this method:
1)Everytime I create a window and making its context current(after GLFW.glfwMakeContextCurrent(window))? or
2)Only once before I call any opengl functions?

Since both the methods doesn’t take window as parameter,I guess it doesn’t matter,right??
So it’s better to use number 2,right??

The function glfwSwapInterval() sets the swap interval for the current OpenGL or OpenGL ES context. So it works on the current context as set by glfwMakeContextCurrent.

The createCapabilities function isn’t part of GLFW. I don’t know anything about it but I assume you can search for the documentation for whatever library you are using which exposes that.

So basically whenever Im switching context,I also need to set the swap internal again and again and again??

You only need to set the swap interval once per context.