I am writing a program class to decode a string of input from a user. I need it to take the integer and return the ASCII charcater coresponding to that int. (i.e. 77=M). Belwo is the code I have so far. Can someone lead me in the right direction to correct my code?
Code:
/*LetterDecode class for LetterCode main program*/
import tio.*; //uses the tio package from the book
import java.lang.*; // for length
import java.util.*; //for the search utilities
class LetterDecode {
public static void main(String[] arguments) {
String d;
int [] buffer;
int d;
System.out.print("What is your message you wish to decode? (Numbers & Spaces Only): ");
d = Console.in.readLine();
buffer = d.toIntArray;
for (int i = 0; i < d.length(); i++)
System.out.print(integer.parseInt(buffer[i] + " "));
Comment