What is an overloaded method and why might you want to overload a method?

What will be an ideal response?


When two or more methods have the same name but different parameterLists, the methods are referred to as overloaded methods. Overloading is useful when two or more methods require different parameters to perform essentially the same task.

Computer Science & Information Technology

You might also like to view...

The method _________ reads a single character from an input stream.

a. readLine() b. skip() c. read() d. close()

Computer Science & Information Technology

As shown in the accompanying figure, what is the term for a network that covers a large geographic area, such as a city, country, or the world, using a variety of wired and wireless transmission media?

A. local area network (LAN) B. metropolitan area network (MAN) C. wide area network (WAN) D. variable area network (VAN)

Computer Science & Information Technology

The most common public-key encryption algorithm is ____.

A. SHA1 B. AES C. DES D. RSA

Computer Science & Information Technology

Peggy found a freely distributed software package for her small business that will allow its sales to be tracked into a database for inventory purposes. ? Can Peggy install this software on all the computers in her store?

A. Yes, this is open source software. B. Yes, because she purchased the software. C. No, this is only for Peggy’s computer.  D. No, even though she purchased the software, it was one copy for one computer.

Computer Science & Information Technology