On Wed, Jul 29, 2009 at 6:20 PM, Dimitar Kolev<dimitarrosenovko...@hotmail.com> wrote: > class plane > { > bool fly = false; > bool fly() > { > if (fly == false) return false; > > // code for flying. > // If it breaks for some reason > return false; > > // else return that everything is okay. > > return true; > } > } > > If I am missing something please say but is this not ambiguous now? > Is the function called or the property?
Neither. The code won't compile, because unlike Java, you are not allowed to have both a field and a method of the same name.