• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

polymorphism and casting in java??????

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
some one please send me some details on polymorphism and how it works in java.
The other problem is that i want to know if java allows me to cast objects into primitive data type for example what am i supposed to do if i want to convert a string into an integer?
reply soon its urgent
Regards
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whole BOOKS are written on what polymorphism is in Java and you want the entire answer in a post?
Why don't you check out the books at the bunkhouse http://www.javaranch.com/books.jsp
We use methods to convert objects to primitives:
int i = Integer.parseInt(someString);
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also check out http://www.javaranch.com/campfire.jsp
 
Asif Anis
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cindy and Marilyn , thanx alot for ur help...u guyz are great .
Takecare and best of luck
Asif
 
Asif Anis
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do me another favour , please l;et me know the URL of any site where i could read more about polymorphism, its types and its uses regarding Java.
tx
asif
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bruce Eckel has "Thinking in Java" online at www.bruceeckel.com and the topic of polymorphism is ALL OVER JavaRanch. Do a search on the word in any on the Java in General forums, the Certification forum or the OO forum and you will get lot's of discussion on it.
One of my favorite threads is here:
http://www.javaranch.com/ubb/Forum24/HTML/009465.html
 
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic