On Mar 16, 8:01 pm, Rafał Laczek <[email protected]> wrote: > Hello, > In exercise 2.2 in "Line" class we have implementation of following > method: > public boolean isGreater( Object a, Object b){ > double aLen = ((Line)a).getLength(); > double bLen = ((Line)b).getLength(); > return (aLen > bLen); > } > > My interpretation of ((Line)a).getLength() is that this is a length of > the object instance "Line1". > Am I right? Right. It can also be written as such for greater clarity: Line lineA=(Line)a; double aLen=lineA.getLength(); > If not please give me short and clear explanation. > > Thanks in advance! > > Regards, > Rafał Laczek > > ---------------------------------------------------- > Trójmiejskie Targi Pracy 2009 -Rozprawiamy się z kryzysem! > Przyłącz się do nas! > Zobacz:http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Ftargipracy...
--~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
