• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

interface extending serializable..

 
Ranch Hand
Posts: 203
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks,

I have an interface that extends Serializable,, my query is that when it it extends Serializable, what it try to represent and what additional qualities it acquired...below is the syntax ..

import java.io.Serializable;

public interface abc extends Serializable {

}

please advise

 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interfaces can extend other interfaces, just like classes can extend other classes.

When a class implements interface A that extends interface B, that's the same as when the class would implement interfaces A and B directly.

When an interface A extends another interface B, then you can't make a class that only implements A and not B - when the class implements A, it automatically also implements B.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Saral Saxena wrote:my query is that when it it extends Serializable, what it try to represent


It represents an object that can be stored permanently (eg, in a file) or passed over a network as a stream to another JVM.

and what additional qualities it acquired...


See above. If your question is: 'Do I need to do anything extra?', the answer is 'probably not', but you should really read the Java tutorials or get a good book.

Winston
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic