Oh yeah. Whenever I start writing something in java, I always head it with import java.util.*;import static java.lang.System.*; It's become common practice for me to the point that I don't think about it and I never use anything I need an import for in codegolf.
It's probably really bad to import things I don't need, but it hasn't caused any problems for me.
Or we could just not import all the things. I get that it's tempting if you're writing java in a basic text editor, but that's why IDEs have auto-imports. Use the right tools.
Make a new language called KitchenSink which is exactly like Java and compiles to Java files, but automatically includes all imports possible without user intervention. Boom, shaved like 20 bytes off each Java answer.
@Pavel The most usual problem is cluttering up your namespace. Naming conflicts should hardly ever come up normally, but they easily can if you have 1000 more classes than you need.
@Pavel C# was created by Microsoft and really doesn't have anything to do with C or C++ besides the name and some borrowed syntax. It's by no means a successor.
@Pavel I have a Java, I have a .NET. Uh-oh, Java.NET
3
@Dennis If there are no other string constants in the program and because the string is empty, the memory after the string is not owned by the program because either read-only data is at the end of the program memory or it try to read code
I thought "don't == to compare strings" was common knowledge until I joined SO. I swear it got asked multiple times every day for several different languages.
@Pavel === in Python is the identity comparison. So, comparing memory addresses to see if two objects are stored in the same place (i.e. the same object). It's the same as is.
@Fatalize Could you link to the chat room that the bot battle was in? I don't want to run Twitch pages on my computer because they laaaaag on slow internet.
> V: do you want to kiss me > E: *french kisses you*. > V: normal kids next time > E: There will be no next time. > V: did you stop loving me > E: Actually, I didn't love you.