Hi!..
I have a problem!...
I need to convert integers to chars,but i`m using char(int)....
So, only accept until ascii code 128..
Please, What can I do?
This is my code:
Thanks!
public Convert() {
}
public static void main(String[] args) {
Convert convert1 = new Convert();
System.out.print(f_Transforma("ABCD"
);
}
public static String f_Transforma(String Password)
{
int IntStrLong=Password.length();
String StrResultado=new String();
while (IntStrLong >=1)
{
int tmpchar=(int)Password.charAt(IntStrLong-1); //valor ascii
tmpchar=256-tmpchar+IntStrLong;
String aChar = new Character((char)tmpchar).toString(); //ASCII code to String
StrResultado=StrResultado+aChar;
IntStrLong-=1;
}
return (StrResultado);
}
I have a problem!...
I need to convert integers to chars,but i`m using char(int)....
So, only accept until ascii code 128..
Please, What can I do?
This is my code:
Thanks!
public Convert() {
}
public static void main(String[] args) {
Convert convert1 = new Convert();
System.out.print(f_Transforma("ABCD"
}
public static String f_Transforma(String Password)
{
int IntStrLong=Password.length();
String StrResultado=new String();
while (IntStrLong >=1)
{
int tmpchar=(int)Password.charAt(IntStrLong-1); //valor ascii
tmpchar=256-tmpchar+IntStrLong;
String aChar = new Character((char)tmpchar).toString(); //ASCII code to String
StrResultado=StrResultado+aChar;
IntStrLong-=1;
}
return (StrResultado);
}