|
Static methods - not working
I'm having problems with a static method. Coming from PHP to Java, I miss the implode() function, so I wrote my own. I have a program with several classes. I need to use this method in all classes, and MainWindow is my central class. I've added the method to MainWindow with the following signature:
public static String implode(String[] ary, String delim) {
But when I try to call it from either of the other classes (it's used during file writing), using MainWindow.implode(), the program just doesn't do anything. I've even changed the file writing part to output to the console, but the method somehow stops after the call to implode() has been made.
Is this the best way of adding an implode feature, or am I doing something wrong?
|