Skip to content
Sharp

Core Java · interview question

How can you ensure a method is reusable in different parts of an e-commerce application?

Multiple choiceMediumchapter-1-curatedpremiumcore-javamethods
Choose one answer
Answer and explanation

Correct answer

C. By using parameters to pass different inputs

Why

Using parameters allows a method to accept different inputs, making it adaptable to various scenarios within an application. This increases the method's reusability across different parts of an e-commerce system.

Test yourself on Core Java

A free test with instant, explained results. No account needed.

Start free test
All Core Java questions →