Kiran Kumar.
Kiran Kumar.
Kiran Kumar.
Forgive me if i am wrong but the naming policy suggests we can use initials
Originally posted by Girish Nagaraj:
Interface doesnot extend any class.
Check out using javap JVM command.
<a href="http://eimers.blogspot.com" target="_blank" rel="nofollow">eimers.blogspot.com</a>
Kiran Kumar.
Originally posted by Shaliey Gowtham:
But how can an interface extend a Class
<a href="http://eimers.blogspot.com" target="_blank" rel="nofollow">eimers.blogspot.com</a>
First of, actually it doesn't matter because all classes extend from java.lang.Object anyway and you can't create an object from an interface.
Regards,<br />Naveen<br />SCJP 5 - 83%<br />SCWCD - 84%
Kiran Kumar.
Originally posted by Girish Nagaraj:
Hi Dick Eimers,
Have a look at this code...
interface Interface {}
abstract class Abstract {}
now when I gave 'javap -c Interface' this is what I got.
Compiled from "Scjp26.java"
interface Interface{
}
and for 'javap -c Abstract' this is what I got.
Compiled from "Scjp26.java"
abstract class Abstract extends java.lang.Object{
Abstract();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>")V
4: return
}
Still do you think interface's extend java.lang.Object???
<a href="http://eimers.blogspot.com" target="_blank" rel="nofollow">eimers.blogspot.com</a>
Kiran Kumar.
Originally posted by bnkiran kumar:
[..] can you explain what is this javap command do
<a href="http://eimers.blogspot.com" target="_blank" rel="nofollow">eimers.blogspot.com</a>
Could you hold this kitten for a sec? I need to adjust this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|