java - Save processed chars one by one to another string -


i've been trying quite while able encrypt string way changing of characters, have managed part finding rot13 :). i'm quite confused on how store result string can viewed later.

public static void main(string[] args) {      string s = "example string";     (int = 0; < s.length(); i++) {         char c = s.charat(i);         if       (c >= 'a' && c <= 'o') c += 6;         else if  (c >= 'a' && c <= 'o') c += 6;         else if  (c >= 'p' && c <= 'z') c -= 10;         else if  (c >= 'p' && c <= 'z') c -= 10;         system.out.print(c);      }  } 

is there possibly way store each individual value of char c separate strings , join strings together? i've tired using stringbuilder have had no luck far, point me in right direction? :)

edit

yeah stringbuilder indeed way go, anyway :)

char = 'a'; char b = 'b'; string str = "" + a+b; 

or try stringbuilder's append.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -