I asume iOS uses Java and pays royalties?
No; Apple made a conscious decision to leave Java out of the iPhone.
And even if they had decided to incorporate Java, they could have released a JVM and class libraries which strictly adhered to Sun's (now Oracle's) published specifications, and then they could have obtained the necessary licenses for free.