Here Comes The Cute Logo ...
And The Friday Quiz
... for Java closures:
According to my cute logo theory, which I put forth 1590 days ago,
Me: In the software world, things that have a cute logo, be it an operating system, an application, a programming language, or a middleware product, win.
And here's this week's Friday Quiz (It's not Friday here yet, but close enough):
Q1: What flavor of Java closures does this logo represent?
Q2: Write a valid Java closures program that contains the string represented by the logo.
Re: Here Comes The Cute Logo ...
A1: either chocolate mint or BGGA, I can never remember
A2:
public class Java {
public Java() { System.out.println("it's the Friday Quiz!"); };
public static void main(String[] args) {
{ => Java } restrictedJava = { => new Java() };
restrictedJava.invoke();
{ ==> Java } unRestrictedJava = restrictedJava;
unRestrictedJava.invoke();
}
}
Bonus question: explain my solution.
great quiz this week, Weiqi
Re: Here Comes The Cute Logo ...
I broke down and compiled and ran your class with the latest BGGA prototype. It prints the message twice.
Before your post, I was thinking along the lines of:
public class Java {
{=>Object} Java = {=>Java};
}
which, believe it or not, compiles.
By the way, the latest prototype is closures-2008-03-05 now. And my previous Friday Quiz made an appearance in
test/tools/javac/closures/Weiqi.java