Generics interview questions

15 Generics questions from the Go bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is Type parameter?

Mid
  1. A.the compiler's ability to deduce omitted type arguments from the ordinary arguments passed to a generic call
  2. B.the predeclared constraint matching any type whose values may be compared with the equality operators
  3. C.an interface used in square brackets that restricts which types a generic parameter may be instantiated with
  4. D.a placeholder in square brackets that lets a function or type operate over many concrete types (added in 1.18)

Answer + AI explanation with Pro

2. Which term means: "a placeholder in square brackets that lets a function or type operate over many concrete types (added in 1.18)"?

Mid
  1. A.Type set
  2. B.comparable
  3. C.Type parameter
  4. D.Type inference

Answer + AI explanation with Pro

3. Which statement is correct?

Mid
  1. A.Type parameter — the compiler's ability to deduce omitted type arguments from the ordinary arguments passed to a generic call
  2. B.Type parameter — an interface used in square brackets that restricts which types a generic parameter may be instantiated with
  3. C.Type parameter — the predeclared constraint matching any type whose values may be compared with the equality operators
  4. D.Type parameter — a placeholder in square brackets that lets a function or type operate over many concrete types (added in 1.18)

Answer + AI explanation with Pro

4. What is Constraint?

Mid
  1. A.an interface used in square brackets that restricts which types a generic parameter may be instantiated with
  2. B.the collection of concrete types permitted by a constraint, expressible with union elements separated by a bar
  3. C.the compiler's ability to deduce omitted type arguments from the ordinary arguments passed to a generic call
  4. D.a placeholder in square brackets that lets a function or type operate over many concrete types (added in 1.18)

Answer + AI explanation with Pro

5. Which term means: "an interface used in square brackets that restricts which types a generic parameter may be instantiated with"?

Mid
  1. A.Constraint
  2. B.comparable
  3. C.Type parameter
  4. D.Type set

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.Constraint — an interface used in square brackets that restricts which types a generic parameter may be instantiated with
  2. B.Constraint — a placeholder in square brackets that lets a function or type operate over many concrete types (added in 1.18)
  3. C.Constraint — the predeclared constraint matching any type whose values may be compared with the equality operators
  4. D.Constraint — the collection of concrete types permitted by a constraint, expressible with union elements separated by a bar

Answer + AI explanation with Pro

7. What is comparable?

Mid
  1. A.an interface used in square brackets that restricts which types a generic parameter may be instantiated with
  2. B.a placeholder in square brackets that lets a function or type operate over many concrete types (added in 1.18)
  3. C.the predeclared constraint matching any type whose values may be compared with the equality operators
  4. D.the collection of concrete types permitted by a constraint, expressible with union elements separated by a bar

Answer + AI explanation with Pro

8. Which term means: "the predeclared constraint matching any type whose values may be compared with the equality operators"?

Mid
  1. A.Type inference
  2. B.comparable
  3. C.Constraint
  4. D.Type parameter

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.comparable — the predeclared constraint matching any type whose values may be compared with the equality operators
  2. B.comparable — the collection of concrete types permitted by a constraint, expressible with union elements separated by a bar
  3. C.comparable — the compiler's ability to deduce omitted type arguments from the ordinary arguments passed to a generic call
  4. D.comparable — a placeholder in square brackets that lets a function or type operate over many concrete types (added in 1.18)

Answer + AI explanation with Pro

10. What is Type set?

Senior
  1. A.a placeholder in square brackets that lets a function or type operate over many concrete types (added in 1.18)
  2. B.the predeclared constraint matching any type whose values may be compared with the equality operators
  3. C.the compiler's ability to deduce omitted type arguments from the ordinary arguments passed to a generic call
  4. D.the collection of concrete types permitted by a constraint, expressible with union elements separated by a bar

Answer + AI explanation with Pro

11. Which term means: "the collection of concrete types permitted by a constraint, expressible with union elements separated by a bar"?

Senior
  1. A.Type set
  2. B.Type inference
  3. C.comparable
  4. D.Type parameter

Answer + AI explanation with Pro

12. Which statement is correct?

Senior
  1. A.Type set — the predeclared constraint matching any type whose values may be compared with the equality operators
  2. B.Type set — the compiler's ability to deduce omitted type arguments from the ordinary arguments passed to a generic call
  3. C.Type set — an interface used in square brackets that restricts which types a generic parameter may be instantiated with
  4. D.Type set — the collection of concrete types permitted by a constraint, expressible with union elements separated by a bar

Answer + AI explanation with Pro

13. What is Type inference?

Senior
  1. A.an interface used in square brackets that restricts which types a generic parameter may be instantiated with
  2. B.the compiler's ability to deduce omitted type arguments from the ordinary arguments passed to a generic call
  3. C.a placeholder in square brackets that lets a function or type operate over many concrete types (added in 1.18)
  4. D.the predeclared constraint matching any type whose values may be compared with the equality operators

Answer + AI explanation with Pro

14. Which term means: "the compiler's ability to deduce omitted type arguments from the ordinary arguments passed to a generic call"?

Senior
  1. A.Constraint
  2. B.Type set
  3. C.Type parameter
  4. D.Type inference

Answer + AI explanation with Pro

15. Which statement is correct?

Senior
  1. A.Type inference — the predeclared constraint matching any type whose values may be compared with the equality operators
  2. B.Type inference — an interface used in square brackets that restricts which types a generic parameter may be instantiated with
  3. C.Type inference — the collection of concrete types permitted by a constraint, expressible with union elements separated by a bar
  4. D.Type inference — the compiler's ability to deduce omitted type arguments from the ordinary arguments passed to a generic call

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Generics question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers