Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 03-14-2008, 08:48 AM   #1 (permalink)
 
Banned

Join Date: Aug 2005

Posts: 3,480

maroon1 is on a distinguished road

Default Overcasting in java

Can some explain to me the concept of overcasting in Java programing ?
maroon1 is offline  
Old 03-14-2008, 09:08 AM   #2 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: Overcasting in java

I believe you mean 'cast' instead of 'overcast'. Casting simply allows you to use an object or primitive as a different type, but there are several restrictions. A simple casting example is shown below.
Code:
double x = 1.234;
int y = (int)x; // y equals 1
You can also cast an object to a parent type in it's inheritance hierarchy or to an implemented interface in the hierarchy. If you aren't familiar with inheritance or interfaces, you may want to learn about those concepts first.
jaeusm is offline  
Old 03-17-2008, 08:26 AM   #3 (permalink)
 
Banned

Join Date: Aug 2005

Posts: 3,480

maroon1 is on a distinguished road

Default Re: Overcasting in java

Thank you, but a friend of mine has already helped me.
maroon1 is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java / Adobe Question Tempest Browser & General Internet Questions 3 11-07-2007 05:53 PM
Dangerous Java Flaw Threatens Virtually Everything Osiris Virus - Spyware Protection / Detection 1 07-13-2007 04:44 PM
hacking online java program. Z e i g Browser & General Internet Questions 8 06-23-2007 01:50 AM
Someone take a look at my Java code PnkFloyd27 Programming Discussions 4 06-21-2007 08:11 PM
Java Game Yek Programming Discussions 5 06-16-2007 04:29 AM