正在加载图片...
Method Overloading r The signature of a method is determined by the method name and the number and data types of parameters. r If multiple methods have the same method name but different signatures the method name is overloaded and we call these methods overloaded public void drawRectangle( int x, int y, int width, int length public void drawRectangle( Rectangle rect drawRectangle is overloaded C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 12-6© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 12 - 6 Method Overloading The signature of a method is determined by the method name and the number and data types of parameters. If multiple methods have the same method name but different signatures, the method name is overloaded and we call these methods overloaded. public void drawRectangle( int x, int y, int width, int length ) { . . . } public void drawRectangle( Rectangle rect ) { . . . } drawRectangle is overloaded
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有