Method Stub

What Does Method Stub Mean?

A method stub is a piece of code used to stand in for some other programming functionality in software development. It may simulate the behavior of an existing piece of code, or stand in for code that has not yet been developed. Stubs play an important role in software development, testing and porting, although they are also widely used in distributed computing.


A method stub may also be known simply as a stub.

Techopedia Explains Method Stub

A method stub merely declares itself and the parameters it accepts. Stubs are used as implementations of a known interface, where the interface is known but not the implementation. Stubs enclose codes to be compiled and linked with the rest of the program. They include just enough code to allow them to be compiled and linked with the existing program.


Related Terms

Latest DevOps Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…