For example, you might want to talk about Java, but Java and its mother company Oracle are trademark names. Or you want to mention the Spring framework which is a registered trademark. Or mentioning Microsoft, Google, Twitter, Facebook as technology companies.
How do trademark laws apply when one wants to write a programming book and needs to use these names of languages, frameworks, or companies inside the book, all trademarks.