After modified the mistakes got the following code, but it is not run >>
What is the reason ؟؟
package encryption;
import java.util.*;
public class Encryption {
public static void main(String[] args) {
Encryption enc = new Encryption();
Scanner S = new Scanner(System.in);
System.out.println(" Enter the text");
String massege = S.next();
System.out.println(" Enter the kay");
int key = S.nextInt();
System.out.println( " the word chyfer is " + enc.NN( massege, key) );
}
public String NN ( String massege , int kay )
{
String STR= "ABCDEFGHIJKLMNOPQRSTWXYZ" ;
char current;
String chyfer= "";
for (int i=0; i<=massege .length();i++)
{
current = massege .charAt(i);
for (int y= 0 ; y<=STR.length(); y++) {
if(current==STR.charAt(y))
{
chyfer+=STR.charAt((kay+y)%26);}
}}
return chyfer ;
}}