It doesn't replace the char with the one I want to and I cannot figure it out.
public static String encrypt(String message, int offset){
String encrypted = message.toUpperCase();
String aplhabet = " ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for (int change = 0;change < encrypted.length();change++){
for (int check = 0;check < aplhabet.length();check++){
if (encrypted.charAt(change) == aplhabet.charAt(check)){
offset = (check+offset)%27;
encrypted.replace(encrypted.charAt(change),aplhabet.charAt(offset));
}
}
}
return encrypted;
}