Programmer Trainee Interview Questions

2,741 programmer trainee interview questions shared by candidates

The interview began with a brief introduction from my side. Technical Questions: OOP Concepts: Discussed the four pillars of OOP. Asked about different access modifiers. Explained inheritance and its various forms in Java. Provided a real-life scenario to illustrate polymorphism. Major Project: Briefly described my major project, mentioning it was still in progress. Internship Discussion: Discussed my internship with no cross-questions. Resume Projects: Answered questions regarding the tech stacks mentioned in my resume. (O)* Explained what Spring/Spring Framework is. (O)* Coding Tasks: The interviewers requested coding tasks in Java, observing how efficiently I wrote the code: Write a code to print all the factors of the number 9. Reverse the string "Your_Name". Swap two numbers without using a third variable and again without using addition or subtraction (using the XOR operator). Find the largest and second-largest numbers in the array. (O)* Database Questions: Discussed the Collection framework and its usage in my projects. Answered questions about SQL, including: The difference between DBMS and RDBMS. Writing a query to fetch the second highest salary from the employee table, explaining the logic. Writing a query to fetch the first three letters of every row in the "Name" column from the employee table, along with an explanation. SQL Query Challenges: I was given a table schema and asked to code five queries in the compiler: Find names starting with "A". Find different departments in the table. Count the number of employees in each department. Retrieve names of employees who participated in any events (joining another table where EmpID is the primary key). Write a query to select the first four letters of all names in the column, resulting in names like SHYA, SWET, RAHU, etc. Further Technical Questions: What is MVC? How is Spring Boot different from Spring? Discussed the differences between Delete, Truncate, and Drop, and provided some DDL commands. (O)* Explained exceptions and exception handling in Java, including Try, Catch, and Finally blocks. Differentiated between final, finally, and finalize. (O)* Conclusion Questions: Asked if I was willing to change tech stacks, particularly in the context of advancing AI technologies. Confirmed my willingness to relocate and work night shifts. I was invited to ask any questions. Result Date: October 23, 2024 Verdict: Selected for the GenC Next package. Note: Most interviewees were asked Spring-related questions, whereas I had fewer inquiries on that topic, despite my training in Spring, Hibernate, Spring Boot, and REST API. Out of 54 interviewees, 35 were selected, with 6 for the GenC NEXT role and the rest for the GenC role. It’s essential to study thoroughly during the Deep Skilling Round to secure a Next Role. Tips for Success: Avoid mentioning unnecessary details on your resume or Superset, as questions can stem from those areas. Even a single tech stack you're unfamiliar with can lead to rejection. Interviewers often look for any mistakes, so be prepared for probing questions. Explain your code as you write it; this gives you an edge. Prepare a solid introduction and aim to impress in the first 10 minutes. If you don't know an answer, move on confidently to the next question. Maintain a positive demeanor throughout the interview.
avatar

Programmer Analyst Trainee

Interviewed at Cognizant

3.5
Dec 27, 2025

The interview began with a brief introduction from my side. Technical Questions: OOP Concepts: Discussed the four pillars of OOP. Asked about different access modifiers. Explained inheritance and its various forms in Java. Provided a real-life scenario to illustrate polymorphism. Major Project: Briefly described my major project, mentioning it was still in progress. Internship Discussion: Discussed my internship with no cross-questions. Resume Projects: Answered questions regarding the tech stacks mentioned in my resume. (O)* Explained what Spring/Spring Framework is. (O)* Coding Tasks: The interviewers requested coding tasks in Java, observing how efficiently I wrote the code: Write a code to print all the factors of the number 9. Reverse the string "Your_Name". Swap two numbers without using a third variable and again without using addition or subtraction (using the XOR operator). Find the largest and second-largest numbers in the array. (O)* Database Questions: Discussed the Collection framework and its usage in my projects. Answered questions about SQL, including: The difference between DBMS and RDBMS. Writing a query to fetch the second highest salary from the employee table, explaining the logic. Writing a query to fetch the first three letters of every row in the "Name" column from the employee table, along with an explanation. SQL Query Challenges: I was given a table schema and asked to code five queries in the compiler: Find names starting with "A". Find different departments in the table. Count the number of employees in each department. Retrieve names of employees who participated in any events (joining another table where EmpID is the primary key). Write a query to select the first four letters of all names in the column, resulting in names like SHYA, SWET, RAHU, etc. Further Technical Questions: What is MVC? How is Spring Boot different from Spring? Discussed the differences between Delete, Truncate, and Drop, and provided some DDL commands. (O)* Explained exceptions and exception handling in Java, including Try, Catch, and Finally blocks. Differentiated between final, finally, and finalize. (O)* Conclusion Questions: Asked if I was willing to change tech stacks, particularly in the context of advancing AI technologies. Confirmed my willingness to relocate and work night shifts. I was invited to ask any questions. Result Date: October 23, 2024 Verdict: Selected for the GenC Next package. Note: Most interviewees were asked Spring-related questions, whereas I had fewer inquiries on that topic, despite my training in Spring, Hibernate, Spring Boot, and REST API. Out of 54 interviewees, 35 were selected, with 6 for the GenC NEXT role and the rest for the GenC role. It’s essential to study thoroughly during the Deep Skilling Round to secure a Next Role. Tips for Success: Avoid mentioning unnecessary details on your resume or Superset, as questions can stem from those areas. Even a single tech stack you're unfamiliar with can lead to rejection. Interviewers often look for any mistakes, so be prepared for probing questions. Explain your code as you write it; this gives you an edge. Prepare a solid introduction and aim to impress in the first 10 minutes. If you don't know an answer, move on confidently to the next question. Maintain a positive demeanor throughout the interview.

They mainly focused on my problem-solving and analytical thinking. I was asked to explain one of my projects in detail, discuss how I approached a data-driven problem, and walk through my reasoning step by step rather than just giving the final answer.
avatar

Programmer Analyst Trainee

Interviewed at Cognizant

3.5
Jan 2, 2026

They mainly focused on my problem-solving and analytical thinking. I was asked to explain one of my projects in detail, discuss how I approached a data-driven problem, and walk through my reasoning step by step rather than just giving the final answer.

OOPS concepts Basic Python and Java conceptual questions A coding question in interview to solve infront of the interviewer - Find the last digit of a number which is formed by merging all the numbers in a given array (numbers in array are of string type)
avatar

Programmer Analyst Trainee

Interviewed at Cognizant

3.5
Feb 18, 2026

OOPS concepts Basic Python and Java conceptual questions A coding question in interview to solve infront of the interviewer - Find the last digit of a number which is formed by merging all the numbers in a given array (numbers in array are of string type)

Viewing 1451 - 1460 interview questions

Glassdoor has 2,741 interview questions and reports from Programmer trainee interviews. Prepare for your interview. Get hired. Love your job.