Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serializable interface and arrays

 
Barkat Mardhani
Ranch Hand
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Dan's exam, Array Assignments q 3 explaination:
All array types implement the Serializable interface and may be assigned to a reference of type Serializable.

Where in API it says that arrays implement Serializable interface?
 
Barkat Mardhani
Ranch Hand
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry. It is in JLS:

There is no permitted conversion from any array type to any interface type,
except to the interface types java.io.Serializable and Cloneable, which
are implemented by all arrays.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic