Bird
0
0

Why is the 'build' directory usually excluded from version control systems like Git in Kotlin projects?

hard📝 Conceptual Q10 of 15
Kotlin - Basics and JVM Runtime
Why is the 'build' directory usually excluded from version control systems like Git in Kotlin projects?
ABecause it contains generated files that can be rebuilt
BBecause it contains source code that should be private
CBecause it stores user-specific configuration files
DBecause it holds external library dependencies
Step-by-Step Solution
Solution:
  1. Step 1: Understand purpose of build directory

    build directory holds compiled classes and generated files from the build process.
  2. Step 2: Reason about version control best practices

    Generated files should not be committed because they can be recreated anytime.
  3. Final Answer:

    Because it contains generated files that can be rebuilt -> Option A
  4. Quick Check:

    build directory excluded as it holds generated files [OK]
Quick Trick: Exclude build folder; it has generated files [OK]
Common Mistakes:
MISTAKES
  • Thinking build contains private source code
  • Confusing build with config files
  • Assuming build holds external libraries

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kotlin Quizzes