greptilian logo

IRC log for #friendlyjava, 2015-04-02

##friendlyjava on freenode

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:53 pdurbin mvn dependency:sources -Dclassifier=javadoc
00:53 pdurbin helpful. via Attaching Sources and JavaDoc to Maven Project : Adam Bien's Weblog - http://www.adam-bien.com/roller/abien/entry/attaching_sources_and_javadoc_to
04:14 cem1 joined ##friendlyjava
05:27 cem1 this refers to your current object. super refers to the super class
05:28 cem1 than how am i able to access instance methods of super class ? aditsu pdurbin pulsar
05:28 cem1 http://stackoverflow.com/questions/6786102/why-is-system-out-printlnsuper-not-permitted#answer-6786134
07:01 Frank89RM_ joined ##friendlyjava
07:31 aditsu cem1: using super.method, obviously
07:33 aditsu or just call the method directly if it's not oerridden :p
07:33 aditsu overridden*
07:34 cem1 after a hour search
07:34 cem1 i found JLS didnt specify anything on it
07:35 cem1 super doesnt reference any object
07:35 cem1 while this does as per spec
07:35 cem1 and i dont know anything beyond it, may be pulsar might know
07:36 pulsar sorry, busy all day.
07:41 aditsu cem1: I already answered your question, what are you asking pulsar for?
07:45 mr_lou joined ##friendlyjava
07:58 cem1 your answer is not with respect to OP question
07:59 cem1 OP asked why super doesnt point object rather super class
08:06 aditsu the OP didn't ask me anything, you did
08:06 aditsu and your question is very different
08:09 aditsu btw, "super" is neither an object nor a class, it's a keyword
08:09 aditsu and you can use it to access the super class's members
08:24 cem1 k let take another keyword for example while,this
08:24 cem1 SOP(while);//compilation error
08:24 cem1 SOP(this);//works fine
08:24 cem1 SOP(super);//compilation error
08:29 aditsu cem1: "this" actually refers to the current object
08:30 cem1 yes
08:31 cem1 but super gives compilation error
08:31 aditsu right, because "super" is not like that
08:31 * cem1 seriously wants to learn english
08:31 cem1 why aditsu
08:32 aditsu English is a useful language to learn :)
08:32 cem1 its very hard aditsu
08:32 aditsu why? because that's how they designed it... you're supposed to use it like super.something, not by itself
08:32 cem1 why ?
08:33 cem1 how it does
08:33 cem1 if its not object
08:34 aditsu I don't know why they designed it like that, but that's how it works
08:34 aditsu by the way, there's no notion of a "super" object, because the object is exactly the same
08:35 aditsu it's just about accessing different methods
08:35 * cem1 wants to know why they did this dilemma just read the JLS
08:36 aditsu you can think of it as a tree with 2 rows of branches; "this" is the tree, if you call methods directly or via "this", you access the higher branches, if you use "super", you access the lower branches
08:37 cem1 what is the past tense for read ?
08:37 aditsu read (pronounced "red")
08:41 aditsu you can also think of it another way... internally, class methods get the object passed as a parameter before all the normal method parameters (this stuff is more explicit in python); the object passed is always "this", but "super" chooses different methods to call
08:45 cem1 left ##friendlyjava
16:35 mr_lou joined ##friendlyjava
20:27 talvdav joined ##friendlyjava
21:35 Frank89RM__ joined ##friendlyjava
21:37 philbot joined ##friendlyjava
21:37 Topic for ##friendlyjava is now Be friendly :) This channel is publicly logged at http://irclog.greptilian.com/friendlyjava/today

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

##friendlyjava on freenode