I'm really tired of being engaged with stuff other than Java and programming
Wish to get back soon to my love...
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
I'm really tired of being engaged with stuff other than Java and programming
Wish to get back soon to my love...
David Newton wrote:Path.newDirectoryStream() returns an implementation.
I'm really tired of being engaged with stuff other than Java and programming
Wish to get back soon to my love...
Esmaeil Ashrafi wrote:
David Newton wrote:Path.newDirectoryStream() returns an implementation.
How? from where? Shouldn't an abstract method have been specified/implemented somewhere!?
Esmaeil Ashrafi wrote:
David Newton wrote:Path.newDirectoryStream() returns an implementation.
How? from where? Shouldn't an abstract method have been specified/implemented somewhere!?
I'm really tired of being engaged with stuff other than Java and programming
Wish to get back soon to my love...
Which is your answer. Whether you can find out any more, I don't know. Note that a sun. package may be changed in future releases.Esmaeil Ashrafi wrote:[b]@ Campbell Ritchie
. . . i did the following snippet: . . . an got the following output:
Esmaeil Ashrafi wrote:It's of course OS specific and without trying i can say for UIX/Linux that will be a different class implements that.But how JVM knows!?...
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Prime wrote:I assume that in the src.zip found in Linux JDK there would be a class java.io.UnixFileSystem.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Prime wrote:...
...The native method probably just returns an instance of one of those classes; the class is hard coded into the JVM which is OK because the Linux JVM is naturally different from the Windows JVM.
I'm really tired of being engaged with stuff other than Java and programming
Wish to get back soon to my love...
Esmaeil Ashrafi wrote:Could following interpretation be right?
in my example,Cipher (the abstract class) is made from one of its subclasses, so when this instance calls the encrypt method (defined in superclass) that calls method encode (the abstract in superclass), firstly looking for method implementation in the instance (subclass) make sense to JVM
And about standard API, when JVM sees no implementation (for example for DirectoryStream<Path>) in my class or package, follows the ways you explained. If so, it seems somehow confusing to understand, it should be predefined in JVM, i think! that is call to newDirectoryStream() cause JVM to call specified class Hard-Coded into JVM...
Rob Prime wrote:...
...The native method probably just returns an instance of one of those classes; the class is hard coded into the JVM which is OK because the Linux JVM is naturally different from the Windows JVM.
what that means (phrase in bold) ?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
I'm really tired of being engaged with stuff other than Java and programming
Wish to get back soon to my love...
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |