That part is fine, but Java idioms seem to routinely think that
String string = new String("string");
isn't enough repetition, and so they take it a step further:
StringFactory mStringFactory = new StringFactory(StringFactory.FOO || StringFactory.BAR);
StringOptions stringOptions = new StringOptions();
try {
String string = mStringFactory.createString(StringFactory.STRING, "string", stringOptions);
} catch (java.lang.string.StringException e) {
runOnUIThread(
new Runnable() {
try {
// facepalm
I'm exaggerating ;) but as a Python programmer myself, this is what comes to my mind whenever someone says the word "Java" to me. Obviously not for strings, but for more advanced constructs (e.g. Bluetooth) I often
do see this much repetition in Java code. It's almost like someone designed this language to prank engineers.