Hi
can anybody tell me how to generate all the special characters in java.

Recommended Answers

All 2 Replies

int i = 5;  //  Or number in the ascii table.
System.out.format("%c ", (char)i);

http://www.lookuptables.com/

Is that what you mean by special characters?

-Fredric

for (int i=1;i<65536;i++)
  {
%>
  <tr>
    <td><%= i %></td>
    <td style="border-right=thin solid blue;">&#<%= i %></td>
    <td>&nbsp;&nbsp;&nbsp;</td>
    <td><%= ++i %></td>
    <td style="border-right=thin solid blue;">&#<%= i %></td>

part of a JSP I wrote that outputs the entire UTF-8 character set.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.