computer display
How does a connected TV to a computer, display different things than the computer monitor?

I am writing a java program, and I want your help for what I want to do. What I want to do is:
I have a computer and a TV. They are connected to each other. I want to see on TV screen something specific, let’s say a video, but I do not want to see it on my computer screen, too.
What should I look for? Any idea?
Thanks!

Your computer doesn’t treat them any differently. Just drag the stuff you want on each screen to the screen you want.

Minecraft Computer Display System (MCCDS)