I'm not Java expert but I'm curious. Suppose that I have this:
String StringRepeater(String s, Qty q) {
String S = "";
for(int i = 0; i<q;i++) {
S +=s;
}
return S;
}
boolean MyComp(int a, int b) {
return (a<b);
}
I want to replace the before code by respective Java code. I don't want to use static class.
It's possible to implement it, but not using a static class/singleton, I read that Java allows to implement this code (different to OOP) in structured programming maybe (Wikipedia).