wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Java might be unneccessarily difficult Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Java might be unneccessarily difficult" Watch "Java might be unneccessarily difficult" New topic
Author

Java might be unneccessarily difficult

Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787

[ August 19, 2003: Message edited by: Barkat Mardhani ]
Dan Lastoria
Ranch Hand

Joined: Jan 30, 2002
Posts: 57
I believe it is to enforce programmer responsibility in order to eliminate coding errors. It can also be easily solved by thus:
Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
I understand that. But what is the logic behind implicit cast arbitarily in some place and not in other place. It just makes language more difficult without any benifit in MHO.
Barkat
Marlene Miller
Ranch Hand

Joined: Mar 05, 2003
Posts: 1391
The JLS explains why the designers of the language decided not to allow implicit narrowing of integer constants in method invocation conversions. JLS 5.3 Method Invocation Conversion
The rules for overloaded method resolution would be more complex otherwise.
Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
Thanks Marlene. That makes sense.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java might be unneccessarily difficult