G
Gergely Buday
Hi folks,
is there an easier way to convert an ascii code to a String than the
method used in this tiny program?
public class Main {
public static void main(String[] args) {
for (int i = 65; i < 91; i++)
{
byte[] bytes = new byte[1];
bytes[0] = (byte) i;
String letter = new String(bytes);
System.out.print(letter);
}
System.out.print("\n");
}
}
- Greg
is there an easier way to convert an ascii code to a String than the
method used in this tiny program?
public class Main {
public static void main(String[] args) {
for (int i = 65; i < 91; i++)
{
byte[] bytes = new byte[1];
bytes[0] = (byte) i;
String letter = new String(bytes);
System.out.print(letter);
}
System.out.print("\n");
}
}
- Greg