Kaushik Sathupadi
Programmer. Creator. Co-Founder. Dad.
See all my projects and blogs →

Fantom Puzzlers

Here are 6 simple but slightly tricky Fantom questions. For each program on the left select the answer on the right and click next. Try these without actually executing the code :). Safely assume that

 

Question 1 : Grandpa's ghost

class Parent : GrandParent{
  Void main(){
    g := GrandParent.make
    g.run
  }
}

class GrandParent{
  
  new make(){
    echo("A Grand parent is made")
  }
  
  Void run(){
    echo("zzzz")
  }
}
Will run and print
A Grand parent is made
zzzz
Will run and print
zzzz
Will run but print something else
Compiler Error
Runtime Error
Post by Kaushik Sathupadi, Founder Cull.io - A platform to recruit web developers by having them develop a web application
 
blog comments powered by Disqus