Infogain Interview Question

What is the difference between procedural and object-oriented programming? Explain the concept of polymorphism in object-oriented programming. How does a database index improve query performance? Describe the difference between a primary key and a foreign key in a database. How would you handle a null pointer exception in your code?