ITnow
DFE Pharma Interview Questions and Answers
Q1. - reducing the time complexity of "for each loop"
Use indexed for loop instead of for each loop to reduce time complexity.
Indexed for loop has a constant time complexity of O(1) whereas for each loop has a time complexity of O(n).
Indexed for loop is faster when accessing elements in an array.
Example: for (int i = 0; i < array.length; i++) { //access array[i] }
Example: for (String str : stringArray) { //access str }
Q2. which language you most prefare
I prefer Java as it is versatile, widely used, and has a strong community support.
Java is versatile and can be used for a variety of applications
Java is widely used in enterprise environments
Java has a strong community support with a large number of libraries and frameworks available
Q3. What are classes and Objects
Classes are blueprints for creating objects in object-oriented programming. Objects are instances of classes.
Classes define the properties and behaviors of objects
Objects are instances of classes that contain data and methods
Classes can inherit properties and behaviors from other classes
Objects can interact with each other by calling methods on each other
Q4. == and === difference with example
Q5. OOPS Concept ( Explain with example )
Q6. Explain recursion with example
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month