// This was the closest i could get in java.
// still confused about the terminology 'SingletonMethod'
public class SingletonMethodJava {
void theOnlyMethod(){
System.out.println("theOnlyMethod");
}
public static void main(String[] args){
new SingletonMethodJava(){
void addedOneMoreMethod(){
System.out.println("addedOneMoreMethod");
}
}.addedOneMoreMethod();
}
}
class SingletonMethodRuby
def theOnlyMethod
puts "theOnlyMethod";
end
end
singleton_method = SingletonMethodRuby.new
def singleton_method.addedOneMoreMethod
puts "addedOneMoreMethod";
end
singleton_method.addedOneMoreMethod
I am passionate about making Better Software Solutions,that helps businesses to stay agile, by applying Agile,Lean and Systems Thinking principles. Also I grow coffee,spices and in general has big interest in pesticide free food!
Subscribe to
Posts [Atom]