Add office photos
Employer?
Claim Account for FREE

TransImpact

3.2
based on 4 Reviews
Filter interviews by

Afcons Infrastructure Interview Questions and Answers

Updated 18 Aug 2024

Q1. Can we have this and the super keyword in the same constructor method

Ans.

Yes, the super keyword can be used in the same constructor method.

  • The super keyword is used to call the constructor of the parent class.

  • It is commonly used to initialize the parent class's instance variables.

  • Example: super(parameter1, parameter2);

Add your answer

Q2. What will happen if the argument is removed from the overridden method

Ans.

The method will no longer be considered as an override and will be treated as a new method.

  • The method will no longer have the same signature as the method it is supposed to override.

  • The compiler will not throw any error as it will treat the method as a new method.

  • The superclass method will be called instead of the overridden method.

Add your answer

Q3. What will happen if we increment the equal method in overridden

Ans.

The behavior of the equal method in an overridden method will change.

  • When the equal method is incremented in an overridden method, the comparison logic will be different from the parent class.

  • This can lead to unexpected behavior if not implemented correctly.

  • Make sure to thoroughly test the new equal method to ensure it functions as intended.

Add your answer

Q4. Which all oops concepts have been used in POM in your project

Ans.

Encapsulation, Inheritance, and Polymorphism are the OOP concepts used in POM.

  • Encapsulation: Encapsulating web elements and their related methods in page classes

  • Inheritance: Extending base page class to create specific page classes

  • Polymorphism: Using method overriding in page classes

Add your answer
Discover Afcons Infrastructure interview dos and don'ts from real experiences

Q5. What is a generic collection in Java

Ans.

A generic collection in Java is a collection that can hold objects of any data type.

  • Generic collections are defined with a type parameter that specifies the type of objects it can hold.

  • Examples of generic collections in Java include ArrayList, LinkedList, and HashMap.

  • Using generic collections helps ensure type safety and avoids the need for explicit type casting.

Add your answer

Q6. WAP to merge 2 sorted array a and b

Ans.

Merge two sorted arrays a and b into a single sorted array

  • Create a new array to store the merged result

  • Use two pointers to iterate through arrays a and b, comparing elements and adding the smaller one to the result array

  • Handle cases where one array is longer than the other by appending the remaining elements to the result array

Add your answer

Q7. What does Dynamic Means

Ans.

Dynamic means constantly changing or active.

  • Constantly changing or evolving

  • Active or lively

  • Responsive to input or stimuli

  • Opposite of static or fixed

  • Examples: Dynamic websites that update in real-time, dynamic pricing in e-commerce

Add your answer

Q8. Differences between Array and ArrayList

Ans.

Array is a fixed-size data structure while ArrayList is a dynamic-size data structure in Java.

  • Array is a static data structure with a fixed size, while ArrayList is a dynamic data structure that can grow or shrink in size.

  • Arrays can hold primitive data types and objects, while ArrayList can only hold objects.

  • Arrays are faster than ArrayList for accessing elements, but ArrayList is more flexible and easier to work with.

Add your answer

Q9. What is Index in SQL

Ans.

Index in SQL is a data structure that improves the speed of data retrieval operations on a database table.

  • Indexes are created on columns in a database table to quickly retrieve data based on the values in those columns.

  • They can be unique or non-unique, clustered or non-clustered.

  • Examples of indexes include primary keys, foreign keys, and indexes created for frequently searched columns.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.9
 • 392 Interview Questions
4.1
 • 203 Interview Questions
4.3
 • 189 Interview Questions
4.2
 • 147 Interview Questions
4.1
 • 137 Interview Questions
4.1
 • 133 Interview Questions
View all
Top TransImpact Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter