The code is shit.
Reasons:
It is not flexible: You have numbered decrypt methods, one for each length. Use for-loops instead. Use them properly so you don't have to nest one loop or if-statement for every character. That is not necessary.
You only need one decrypt method.
It is slow: As Kulver said: Threading can be used, but that is something you can do as an exercise once you have made the code more clean.
tester=""+ar[a]+""+ar[b]+""+ar[c]+""+ar[d]+""+ar[e];
String concatenations within several for loops --> bad performance
Use StringBuilder instead.
public boolean compareit(String s1, String s2)
{
if(s1.contains(s2))
return true;
else
return false;
}
You can just do:
public boolean compareit(String s1, String s2) {
return s1.contains(s2);
}
Which defeats the purpose of this method at all. Just use contains() as it is.
int a,b,c,d,e,f;
These are only used as indices in for loops. No need to make them fields. You should always make your variables as local as possible. Just do
for(int a = 0; a < len; a++)
Same for the other fields. All of them can be declared within the decrypt method.
Also have a look at the Java code conventions:
http://www.oracle.com/technetwork/java/codeconv-138413.htmlI think this is enough for now (it is still not everything). Repair your code and you get more feedback. Ask, if you need any help with this.