I think Java is the best programming language for IoT as it is the most widely taught programming language and the oops concept can be better used for designing IoT. As it is platform independent running it on different devices wont be much of a problem.
Again, Java is an object-oriented programming language for IoT.
Java has built-in capabilities useful for IoT applications.
Java is highly portable and doesn’t have hardware limitations.