Developer

200+ Developer Interview Questions and Answers

Updated 11 Jul 2025
search-icon

Asked in HARMAN

4d ago

Q. Which programming language do you regularly use at work?

Ans.

I regularly use Python in my work.

  • Python is a versatile and powerful programming language.

  • It is widely used for web development, data analysis, and automation.

  • Python has a large and active community, making it easy to find support and resources.

  • Some popular Python frameworks and libraries include Django, Flask, and NumPy.

3d ago

Q. Given a 2D array, find an element which is the maximum in its column and minimum in its row. You are assured that at least one such element exists. You may return any one if multiple such elements exist. Write...

read more
Ans.

Find element in 2D array which is max in column and min in row with minimum comparisons

  • Iterate over rows and columns to find max and min elements respectively

  • Compare the max element of a column with the min element of its row

  • Return the element if it satisfies the condition

  • Consider edge cases like multiple elements satisfying the condition

Developer Interview Questions and Answers for Freshers

illustration image

Asked in HARMAN

4d ago

Q. What steps do you take to ensure accurate project estimates?

Ans.

To ensure accurate estimates for a project, I follow these steps:

  • Thoroughly analyze project requirements and scope

  • Break down the project into smaller tasks

  • Consider past project data and historical performance

  • Consult with team members and stakeholders

  • Use estimation techniques like bottom-up or top-down

  • Factor in potential risks and uncertainties

  • Regularly review and update estimates as the project progresses

4d ago

Q. Write a formula to display A if A is present, display B if B is present, else display None.

Ans.

Write a formula to display A if A is present, display B if B is present else display None.

  • Use conditional statements to check if A or B is present

  • If A is present, display A

  • If B is present, display B

  • If neither A nor B is present, display None

Are these interview questions helpful?
5d ago

Q. Can you describe method overloading versus method overriding? Does it happen at compile time or runtime?

Ans.

Method overloading is when multiple methods have the same name but different parameters. Method overriding is when a subclass provides a different implementation of a method from its superclass.

  • Method overloading allows a class to have multiple methods with the same name but different parameters.

  • Method overriding occurs when a subclass provides a different implementation of a method that is already defined in its superclass.

  • Method overloading is resolved at compile time based...read more

Q. Can the 'this' keyword be equal to null?

Ans.

No, the 'this' keyword cannot be equal to null.

  • The 'this' keyword refers to the current instance of a class.

  • It is used to access the members of the current object.

  • Since 'this' refers to an object, it cannot be null.

Developer Jobs

SAP India Pvt.Ltd logo
Developer- ABAP, CDS, Odata, BOPF 4-8 years
SAP India Pvt.Ltd
4.2
₹ 9 L/yr - ₹ 28 L/yr
(AmbitionBox estimate)
Bangalore / Bengaluru
SAP India Pvt.Ltd logo
Developer 4-7 years
SAP India Pvt.Ltd
4.2
₹ 9 L/yr - ₹ 30 L/yr
(AmbitionBox estimate)
Bangalore / Bengaluru
Mahindra & Mahindra logo
Sr. Developer (MMFSL) 3-8 years
Mahindra & Mahindra
4.1
Mumbai

Asked in SAP

2d ago

Q. How do you handle a team, and what are some areas of improvement for each team under the manager, as approved by the Director?

Ans.

To handle a team, identify areas of improvement for each team member and get approval from the Director.

  • Regularly communicate with team members to understand their strengths and weaknesses.

  • Provide constructive feedback and coaching to help team members improve.

  • Set clear goals and expectations for each team member.

  • Encourage collaboration and teamwork within the team.

  • Get approval from the Director before implementing any major changes or improvements.

Asked in Infosys

3d ago

Q. What is the difference between C++and java ? Which one do you think better and why?

Ans.

C++ is a compiled language while Java is an interpreted language. Both have their own advantages and disadvantages.

  • C++ is faster and more efficient than Java due to its compiled nature.

  • Java is more platform-independent and has better memory management.

  • C++ is commonly used for system-level programming while Java is used for web and mobile applications.

  • Choosing between the two depends on the specific project requirements and goals.

Share interview questions and help millions of jobseekers 🌟

man-with-laptop
4d ago

Q. Design an elevator system with 5 elevators and 50 floors. What design considerations determine which elevator responds to a button press on a given floor?

Ans.

Design considerations for an elevator system with 5 elevators and 50 floors.

  • Traffic patterns and peak hours should be analyzed to determine the optimal number of elevators to be in operation at any given time.

  • Elevators should be programmed to prioritize stops based on the direction of travel and the proximity of the requested floor to the elevator's current location.

  • The system should be designed to minimize wait times and maximize efficiency.

  • Safety features such as emergency ...read more

1d ago

Q. What do you know about class loading? Explain Java class loaders? If you have a class in a package, what do you need to do to run it? Explain dynamic class loading?

Ans.

Explanation of Java class loading and dynamic class loading.

  • Java class loaders are responsible for loading classes into the JVM.

  • There are three types of class loaders: bootstrap, extension, and application.

  • To run a class in a package, you need to specify the fully qualified name of the class.

  • Dynamic class loading allows classes to be loaded at runtime instead of compile time.

  • This can be useful for plugins or modules that are not known at compile time.

4d ago

Q. You have a 3-gallon jug and a 5-gallon jug. How would you measure out exactly 4 gallons of water?

Ans.

Fill the 3 gallon jug, pour it into the 5 gallon jug, fill the 3 gallon jug again, pour it into the 5 gallon jug until it is full, leaving 1 gallon in the 3 gallon jug.

  • Fill the 3 gallon jug

  • Pour the 3 gallon jug into the 5 gallon jug

  • Fill the 3 gallon jug again

  • Pour the 3 gallon jug into the 5 gallon jug until it is full

  • The 4 gallon jug will have 1 gallon of water

Q. Why is constructor overriding not allowed in Java?

Ans.

Constructor overriding is not allowed in Java to maintain the integrity of the object creation process.

  • Constructor is used to initialize the object state, and allowing overriding can lead to unexpected behavior.

  • Inheritance allows the subclass to inherit the superclass constructor, but not override it.

  • If a subclass needs to modify the behavior of the superclass constructor, it can use constructor chaining or call a separate method.

  • Example: If a subclass overrides the superclas...read more

Asked in Barclays

5d ago

Q. 1. Sorting Algo, write code, how do you calculate complexity of that and what are the types. 2. ArrayList sorting 3. Abstract class and Interface and which to use when and why? 4. Given a diagram of the archite...

read more
Ans.

Answering interview questions for a Developer position

  • Sorting algorithms: code, complexity calculation, and types

  • ArrayList sorting

  • Abstract class vs Interface

  • Explaining application architecture

  • Different types of joins and their usage

  • Swap logic with and without a third variable

  • Client-side vs server-side validation

  • Code deployment experience

  • Working in sprints

1d ago

Q. How many programming languages do you know?

Ans.

I know multiple programming languages.

  • I am proficient in Java, Python, and C++.

  • I have experience with web development languages such as HTML, CSS, and JavaScript.

  • I am familiar with scripting languages like Ruby and Perl.

  • I have worked with database query languages like SQL.

  • I am constantly learning and exploring new programming languages.

Asked in Amdocs

5d ago

Q. Write a query to find the second highest salary in a table.

Ans.

Query to find the second highest salary in a table.

  • Use the MAX() function to find the highest salary.

  • Use the WHERE clause to exclude the highest salary from the result.

  • Use the MAX() function again to find the second highest salary.

1d ago

Q. Given a sentence, write a function that returns the first word in the string and modifies the string to contain the remaining words.

Ans.

Create a function to extract the first word from a sentence and modify the sentence to exclude that word.

  • Define a function that takes a string as input.

  • Use string methods to split the sentence into words.

  • Return the first word and modify the original string to exclude it.

  • Example: For input 'Hello World', return 'Hello' and modify to 'World'.

  • Handle edge cases like empty strings or single-word inputs.

Q. Why is normalization used, and what is 3NF with an example?

Ans.

Normalization is used to eliminate data redundancy and improve data integrity. 3NF ensures that each attribute is dependent on the primary key.

  • Normalization helps in organizing data in a structured manner

  • It eliminates data redundancy and inconsistencies

  • 3NF ensures that each attribute is dependent on the primary key

  • For example, a table with columns like Order ID, Product ID, and Customer ID can be normalized to eliminate redundant data

Asked in Infanion

1d ago

Q. You will be given 3 programs to complete one after the other. You need to type the code, execute it, and show the output. Are you comfortable with this?

Ans.

Demonstrating the execution of three sequential programs in a coding interview.

  • Understand the requirements of each program before coding.

  • Write clean and efficient code for each program.

  • Test each program individually to ensure correctness.

  • Use comments to explain complex logic in the code.

  • Example: For a program that calculates the sum of an array, ensure to handle edge cases.

Q. Write code to find all subsequences of a given sequence.

Ans.

Subsequences are derived from a sequence by deleting some elements without changing the order of the remaining elements.

  • A subsequence can be formed by deleting zero or more elements. Example: From 'abc', subsequences include '', 'a', 'b', 'c', 'ab', 'ac', 'bc', 'abc'.

  • The number of subsequences of a string of length n is 2^n. For 'abc' (n=3), there are 2^3 = 8 subsequences.

  • Subsequences differ from substrings; substrings require contiguous elements. Example: 'abc' has substring...read more

2d ago

Q. Given a binary tree, connect each node to the node on its right at the same level. Assume each node has an extra pointer to perform the connection.

Ans.

Connect nodes to their right in a binary tree using an extra pointer.

  • Traverse the tree using level order traversal

  • For each node, connect its right child to the next node in the level

  • If there is no next node, set the right child to null

Q. What is inheritance with code. Difference between overloading and overriding.

Ans.

Inheritance is a mechanism in OOP where a new class is derived from an existing class. Overloading is having multiple methods with the same name but different parameters. Overriding is having a method in the subclass with the same name and parameters as in the superclass.

  • Inheritance allows for code reuse and promotes code organization.

  • Overloading is used to have multiple methods with the same name but different parameters.

  • Overriding is used to change the implementation of a m...read more

Q. Can the order of static and public keywords be interchanged?

Ans.

No, static and public cannot be interchanged.

  • Static and public are two different keywords in programming.

  • Static is used to define a variable or method that belongs to the class itself, rather than an instance of the class.

  • Public is an access modifier that allows the variable or method to be accessed from anywhere in the program.

  • Interchanging static and public would result in a syntax error.

  • For example, in Java, the following code is valid: public static int myVariable = 10;

  • Bu...read more

Asked in HARMAN

6d ago

Q. How do you manage computing priorities or requests?

Ans.

Managing computing priorities involves prioritizing requests based on urgency, importance, and available resources.

  • Assess the urgency and importance of each request

  • Consider the impact on business goals and objectives

  • Evaluate the available resources and capacity

  • Communicate with stakeholders to understand their needs

  • Establish a prioritization framework or criteria

  • Regularly review and adjust priorities as needed

Asked in Infanion

6d ago

Q. After answering questions about polymorphism, such as getter and setter methods, explain why we need to use getters and setters. How do they provide security?

Ans.

Getters and setters enhance encapsulation, allowing controlled access to object properties while providing security and validation.

  • Encapsulation: Getters and setters encapsulate the internal state of an object, preventing direct access to properties.

  • Validation: They allow for validation of data before it is set, ensuring that only valid data is stored. Example: setting age must be a positive number.

  • Security: By restricting direct access, they protect sensitive data from unint...read more

Asked in Saxo Bank

4d ago

Q. How virtual functions work? Vpointer and vtable how it works internally?

Ans.

Virtual functions allow polymorphism in C++. Vtable is a lookup table for virtual functions and vpointer points to it.

  • Virtual functions are used to achieve runtime polymorphism

  • Vtable is a table of function pointers for virtual functions

  • Vpointer points to the vtable of the object

  • When a virtual function is called, the vpointer is used to lookup the correct function in the vtable

  • Vtable is created at compile time and is unique for each class

Asked in Infosys

4d ago

Q. What is the most popular SDLC model?

Ans.

The most popular SDLC model is Agile.

  • Agile is iterative and flexible, allowing for changes throughout the development process.

  • It emphasizes collaboration and customer satisfaction.

  • Other popular models include Waterfall, Spiral, and V-Model.

  • Agile is commonly used in software development, but can be applied to other industries as well.

Asked in Saxo Bank

3d ago

Q. Exception handling in constructor and destructor. Can we do it . If yes how? If not why not ?

Ans.

Yes, we can handle exceptions in constructor and destructor.

  • In constructor, we can use try-catch block to handle exceptions.

  • In destructor, we should avoid throwing exceptions as it can lead to undefined behavior.

  • If an exception is thrown in constructor, the object is not fully constructed and should be destroyed.

  • If an exception is thrown in destructor, it should be caught and handled properly to avoid program termination.

Asked in NeoSOFT

1d ago

Q. What is the difference between useMemo and useCallback?

Ans.

useMemo is used to memoize a value while useCallback is used to memoize a function.

  • useMemo is used to optimize expensive computations by caching the result and returning it if the inputs are the same.

  • useCallback is used to optimize expensive function creation by caching the function and returning it if the inputs are the same.

  • useMemo returns a value while useCallback returns a memoized function.

  • useMemo is used for memoizing values that are not functions while useCallback is u...read more

Asked in TCS

2d ago

Q. How setup network in lab anf what equipment u required?

Ans.

To setup a network in a lab, you need equipment and a plan.

  • Determine the network topology and design

  • Choose appropriate networking equipment such as routers, switches, and cables

  • Configure network settings such as IP addresses and subnet masks

  • Test the network to ensure connectivity and functionality

  • Consider security measures such as firewalls and access control

  • Examples of equipment: Cisco routers, Juniper switches, Cat6 Ethernet cables

Q. Types of Constructors

Ans.

Types of Constructors

  • Default constructor: No arguments, initializes object with default values

  • Parameterized constructor: Takes arguments and initializes object with provided values

  • Copy constructor: Creates a new object by copying the values of an existing object

  • Static constructor: Initializes static members of a class

  • Private constructor: Restricts the creation of objects from outside the class

1
2
3
4
5
6
7
Next

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Accenture Logo
3.7
 • 8.7k Interviews
Infosys Logo
3.6
 • 7.9k Interviews
Wipro Logo
3.7
 • 6.1k Interviews
Cognizant Logo
3.7
 • 5.9k Interviews
View all
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits