Add office photos
Employer?
Claim Account for FREE

EPAM Systems

3.8
based on 1.3k Reviews
Filter interviews by

10+ Luxoft Interview Questions and Answers

Updated 8 Oct 2024
Popular Designations

Q1. what is equals and hashcode and does Object class implement equals method ?

Ans.

equals and hashcode are methods in Java used for comparing objects and generating hash codes respectively. Object class does implement equals method.

  • equals method is used to compare two objects for equality. It is overridden in most classes to provide custom comparison logic.

  • hashcode method is used to generate a unique integer value for an object. It is used in hash-based collections like HashMap.

  • Object class does implement equals method, but it uses reference equality (==) f...read more

Add your answer

Q2. What are other principles apart from SOLID for best coding practices.

Ans.

Other principles for best coding practices include DRY, KISS, YAGNI, and design patterns.

  • DRY (Don't Repeat Yourself) - Avoid duplicating code by creating reusable functions or classes.

  • KISS (Keep It Simple, Stupid) - Write simple and easy-to-understand code rather than overcomplicating it.

  • YAGNI (You Aren't Gonna Need It) - Only implement functionality that is needed at the present moment, avoiding unnecessary features.

  • Design Patterns - Follow established design patterns like S...read more

Add your answer

Q3. What happens when the Liskov Substitution principle breaks?

Ans.

Code becomes less maintainable and can lead to unexpected behavior.

  • Violates the principle of substitutability, leading to unexpected behavior in subclasses.

  • May result in code that is harder to understand and maintain.

  • Can lead to bugs and errors that are difficult to trace back to the violation of the principle.

  • Example: If a subclass overrides a method in a way that changes its behavior significantly, it can break the Liskov Substitution principle.

Add your answer

Q4. what are the time complexities of various data structures.

Ans.

Time complexities of data structures vary based on operations like insertion, deletion, search, etc.

  • Arrays - O(1) for access, O(n) for insertion/deletion

  • Linked Lists - O(n) for access, O(1) for insertion/deletion at head/tail

  • Stacks - O(1) for push/pop operations

  • Queues - O(1) for enqueue/dequeue operations

  • Hash Tables - O(1) for average case search/insert/delete

  • Binary Trees - O(log n) for search/insert/delete in balanced trees

  • Heaps - O(log n) for insert/delete, O(1) for find-mi...read more

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

Q5. Find the kth Largest element of array using Stream API (java 8)

Ans.

Use Stream API to find the kth largest element in an array of strings.

  • Convert array of strings to Stream

  • Sort the Stream in reverse order

  • Skip k-1 elements and get the kth element

Add your answer

Q6. SQL Query to find highest salary of employee in each department

Ans.

Use SQL query to find highest salary of employee in each department

  • Use GROUP BY clause to group by department

  • Use MAX() function to find highest salary in each group

  • Join the employee table with department table to get department information

Add your answer
Are these interview questions helpful?

Q7. What features were introduced in Java 8?

Ans.

Java 8 introduced features like lambda expressions, functional interfaces, streams, and default methods.

  • Lambda expressions allow you to pass functionality as an argument to a method.

  • Functional interfaces have a single abstract method and can be used with lambda expressions.

  • Streams provide a way to work with sequences of elements and perform aggregate operations.

  • Default methods allow interfaces to have method implementations.

Add your answer

Q8. Internal working of hashmap in Java 8?

Ans.

HashMap in Java 8 uses an array of linked lists to store key-value pairs, with bucketing and resizing for efficient retrieval.

  • HashMap internally uses an array of linked lists to store key-value pairs

  • Each element in the array is a bucket, and each bucket can have multiple entries

  • Hashing is used to determine the index of the array where the key-value pair will be stored

  • In case of hash collisions, entries are stored in a linked list within the same bucket

  • HashMap dynamically resi...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. What is D in SOLID principles.

Ans.

D stands for Dependency Inversion Principle in SOLID principles.

  • High-level modules should not depend on low-level modules. Both should depend on abstractions.

  • Abstractions should not depend on details. Details should depend on abstractions.

  • Example: Using interfaces to decouple classes and allow for easier testing and maintenance.

Add your answer

Q10. AWS services worked on? Features of AWS?

Ans.

Worked on AWS services like EC2, S3, RDS, Lambda, and more. Familiar with features like scalability, security, and cost-effectiveness.

  • Worked on EC2 for scalable computing power

  • Utilized S3 for secure and durable storage

  • Managed RDS for relational database management

  • Implemented Lambda for serverless computing

  • Familiar with features like scalability, security, and cost-effectiveness

Add your answer

Q11. Encapsulation vs Abstraction?

Ans.

Encapsulation focuses on hiding the internal state of an object, while abstraction focuses on showing only the necessary details of an object.

  • Encapsulation is the concept of bundling the data (attributes) and methods (behaviors) that operate on the data into a single unit (class).

  • Abstraction is the concept of hiding the implementation details and showing only the necessary features of an object.

  • Encapsulation helps in data hiding and protecting the internal state of an object ...read more

Add your answer

Q12. How tree set works

Ans.

Tree set is a sorted set implementation based on a binary search tree.

  • Tree set stores elements in sorted order using a binary search tree

  • It does not allow duplicate elements

  • Operations like add, remove, and search have O(log n) time complexity

  • Example: TreeSet treeSet = new TreeSet<>();

Add your answer

Q13. Internals of LinkedHashMap

Ans.

LinkedHashMap is a subclass of HashMap with predictable iteration order based on insertion order.

  • Maintains a doubly-linked list of entries to preserve insertion order

  • Supports access-order and insertion-order modes

  • Access-order mode reorders entries based on access frequency

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Luxoft

based on 9 interviews
1 Interview rounds
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Java Developer Interview Questions from Similar Companies

3.7
 • 23 Interview Questions
3.9
 • 19 Interview Questions
3.8
 • 18 Interview Questions
3.7
 • 16 Interview Questions
3.8
 • 15 Interview Questions
3.7
 • 10 Interview Questions
View all
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

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