Search Options
close
Search the following clips:
All Clips
Everyone's Clips
My Guides
Sign Up
Install
Learn More
Login
API design Fundamental
nitinpai
follow
0
11-11-2006 3:35 PM
526 views
tags:
java
,
api
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Today's Top Clips
CAN YOU SEE THE CUTE NOW?
These killers don't deserve the rights of Americans
The Human Brain
Left Won’t Let Facts Get In the Way of Global Warming
Obama Playbook
The dog who saves his owner's life every night
Glenn kicks a bit o butt
Facts about Animals
DOGS ARE A MAN'S BEST FRIEND?
Remember the troops at Thanksgiving
visit the
Top Clips page
View the Top Clips from
November 11, 2006
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/908c8465-09ba-4e72-8d66-a0848761fbac/93337259-9DF7-451D-9A6E-853EC7D5C842/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://openide.netbeans.org/tutorial/api-design.html" href="http://openide.netbeans.org/tutorial/api-design.html" style="font-size: 11px;">openide.netbeans.org</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://openide.netbeans.org/tutorial/api-design.html"><P> The other reason why to prefer methods can be found in the <EM>Java Virtual Machine</EM> specification. It is allowed to move a method from a class to one of its superclasses and still remain binary compatible. So a method initially introduced as <CODE>Dimension javax.swing.JComponent.getPreferredSize(Dimension d)</CODE> can be deleted in new version and moved to <CODE>Dimension java.awt.Component.getPreferredSize(Dimension d)</CODE> as the <CODE>JComponent</CODE> is a subclass of <CODE>Component</CODE> (this really happened in JDK 1.2). Such operation is not allowed for fields. Once a field is defined in a class, it has to stay there forever in order to keep binary compatibility. That is another reason why it is better to keep fields private. </P></blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/93337259-9DF7-451D-9A6E-853EC7D5C842/blog/" title="blog or email this clip"><img src="http://content7.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
New from the makers of Clipmarks:
Amplify.com - Don't just share the news...Amplify it!
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Copyright
Privacy
EULA
OK