What does a try-catch block do in Java?
A try-catch block throws an error when something goes wrong in the code.
That's incorrect. A try-catch block is used to handle exceptions, not throw them.
Can you explain what the `throw` keyword does in Java and how it relates to exceptions?