Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Downcasting in Java.  RSS feed

 
Shankara Sharma
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we do down casting in Java? Please provide an example.
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The child type should be specified in brackets
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shankara Sharma wrote:How can we do down casting in Java? Please provide an example.


In the future, please ShowSomeEffort(⇐click) and SearchFirst.(⇐click)

java downcasting example
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!