jeudi 4 février 2021

Having a issue in incrementing the String ..Can someone pls give the inputs as iam stuck and not able to go further

when I run the below script every time it adds random text a UU and saves and then again it when the alert comes that the key already exist it adds again and then saves and goes on till a unique key is got MY REQUIREMENT

  1. Just add a unique Key once and click on save and this is not happening with the below code...moreover it generates a random text as UU where as I need the text as "test" which needs to be incremented after every run, Can you please let me know what I need to do

          String Key="test"; 
          String STR = new String(); 
    
        for(int j = 0; j<Key. length(); j++)
       { 
          STR+ = (char)(Key.charAt(j)+1));
    

}




Aucun commentaire:

Enregistrer un commentaire