• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

interface as pointer

 
vishwas bhatt
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi.
this is first time.i hope i will got a perfect answer.
myself preparing java from just JAVA. i have got problem in that
in interface topic there is one line that i don't understand.
"Interface is just like pointer to function in 'c' "
please help
wating for you reply.

 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have any c background?? If not you will probably not understand the reference to how something works in c.
 
vishwas bhatt
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks cindy for your replay.
i have got good c and c++ background. i understand the topin "pointer to function" very well . but i can't match this with interface in java.
please help me.
wating of you replay.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a class that has an interface, and you are familiar with the methods of that interface, then you know that the new class will have all of those methods.
Implementing the interface "flags" or "points out" to the world that the methods (functions) are available.
 
vishwas bhatt
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cindy can you explain me this by giving any example.
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider this example. We define one interface which is implemented by two classes. Another class may be passed any class which implements the interface, and calls the method defined in the interface. Which implementing class to create and pass in is not known until run-time (chosen by a command-line argument).

I hope this helps.
 
vishwas bhatt
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
frank ,
i realy got it...!!! what i want . thank's a lot . thanks.
i got one more problem regarding java I/O . I want some tutorial
for I/O which can teach me i/O on very elementary level (low -level). i am aware about whole hirarchy . but i want more . help
me.
hoping for same response ( thank's again)
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the File Access Chapter of this tutorial.
http://developer.java.sun.com/developer/onlineTraining/Programming/BasicJava1/
 
vishwas bhatt
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks cindy.
this will help me lot thank's a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic