help
can someone tell me why this wont compile...
publicclass Decrypt
{
private String alphabet;// from Driver
private String plaintext;// to be set
privateint encrypted[];// from Driver
privateint length;// # elements in encrypted array
public Decrypt(String alphabet,int[] encrypted,int length){
this. alphabet = alphabet;
this. encrypted = encrypted;
this. length = length;
decrypt();
}
privatevoid decrypt(){
for (int i = 0; i < encrypted.length(); i++)
{
plainText += alphabet.charAt(encrypted[i]);
}
}
public String getPlaintext(){
return plaintext;
}
}
is something wrong in this line:
privatevoid decrypt(){
for (int i = 0; i < encrypted.length(); i++)
{
plainText += alphabet.charAt(encrypted[i]);
}
}
Message was edited by:
JohnML

