Library: Reusable code written by someone else that you call when you need it for a specific job, such as formatting dates, reading Excel files, or making HTTP calls. Unlike a framework, your own code stays in control.
Example
Instead of writing your own date formatting logic, you add a date library to the project and call one function to show "27 Oct 2026" on the screen.
Library vs Framework
You call a library when you need it. A framework calls your code and decides the overall structure. In practice, a project usually uses one main framework and many libraries.
How Libraries are Added to a Project
| Language | Package manager | Where libraries are listed |
|---|---|---|
| Java | Maven or Gradle | pom.xml or build.gradle |
| JavaScript | npm or yarn | package.json |
| Python | pip | requirements.txt or pyproject.toml |
| C# | NuGet | the .csproj file |
Each library becomes a dependency of your project.
Choosing a Library Safely
- Check whether the team already uses a library for the same job.
- Prefer well-known, actively maintained libraries.
- Check the licence; some are not allowed in company products.
- Ask before adding a new dependency in a team project; it affects everyone.
Related terms
- Framework: the larger structure that calls your code.
- SDK: a toolkit that often includes libraries.
- Dependency: what a library becomes in your project.
- API: the functions a library exposes are its API.
Previous term: Large Language Model (LLM) | Next term: Logging
Related guides
- Which Technology Should I Learn for an IT Internship?
- Technical Interview Questions for Freshers
- Build a GitHub Portfolio That Gets You Internship Interviews
Frequently asked questions
What is a library in programming?
A library is reusable code that provides ready-made functions for a specific job, which your program calls when needed.
What is the difference between a library and a framework?
You call a library. A framework controls the flow of the application and calls your code.
What is a package manager?
A tool, such as npm, pip, Maven, or NuGet, that downloads libraries and keeps track of their versions.
Can I add any library to a company project?
Ask first. Teams check maintenance, security, and licences before adding new dependencies.
Explore more internship terms
The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.
Browse all 199 terms