How can I insert a color tag in a string? (Java)
<p>If string is <code>Java is Great!</code> then how can I make it like this: </p>

<pre><code>&lt;font color="red"&gt;Java&lt;/font&gt; &lt;font color="blue"&gt;is&lt;/font&gt; &lt;font color="yellow"&gt;Great!&lt;/font&gt;
</code></pre>

<p>The value of color should different for each one. </p>

<p>Similarly, how can I do it for all the words, e.g. </p>

<pre><code>&lt;font color="color1"&gt;J&lt;/font&gt;
&lt;font color="color2"&gt;a&lt;/font&gt;
&lt;font color="color3"&gt;v&lt;/font&gt;
&lt;font color="color4"&gt;a&lt;/font&gt;
&lt;font color="color5"&gt; &lt;/font&gt;
&lt;font color="color6"&gt;i&lt;/font&gt;
&lt;font color="color6"&gt;s&lt;/font&gt;
&lt;font color="color7"&gt; &lt;/font&gt;
&lt;font color="color8"&gt;G&lt;/font&gt;
&lt;font color="color9"&gt;r&lt;/font&gt;
&lt;font color="color10"&gt;e&lt;/font&gt;
&lt;font color="color11"&gt;a&lt;/font&gt;
&lt;font color="color12"&gt;t&lt;/font&gt;
&lt;font color="color13"&gt;!&lt;/font&gt;
</code></pre>

<p>Using different String methods?</p>
