Add office photos
Employer?
Claim Account for FREE

Luxoft

3.7
based on 590 Reviews
Filter interviews by

10+ Interview Questions and Answers

Updated 21 Oct 2024
Popular Designations

Q1. What algo Java 8 Garbage collector follow

Ans.

Java 8 Garbage collector follows the algorithm called G1 (Garbage-First).

  • G1 divides the heap into regions and collects garbage in small portions called 'garbage-first' regions.

  • It uses multiple parallel threads for garbage collection.

  • G1 aims to minimize pause times by dynamically adjusting the amount of garbage collected in each region.

  • It uses a combination of young and old generation collection to achieve better performance.

  • G1 also supports concurrent garbage collection, allo...read more

View 1 answer

Q2. what is SOLID Principal? and Explain L into it?

Ans.

SOLID is a set of principles for object-oriented programming. L stands for Liskov Substitution Principle.

  • SOLID principles help in creating maintainable and scalable software.

  • Liskov Substitution Principle states that objects of a superclass should be replaceable with objects of its subclasses without affecting the correctness of the program.

  • This principle ensures that the behavior of the program remains consistent even when objects are replaced with their subtypes.

  • For example,...read more

Add your answer

Q3. 1)How to calculate time complexity of contains method 2)Java 8 program

Ans.

Calculating time complexity of contains method in Java 8

  • Time complexity of contains method in Java 8 is O(n)

  • It depends on the size of the collection and the type of collection used

  • For example, for ArrayList, it is O(n), for HashSet, it is O(1)

  • Java 8 introduced a new method called contains(Object o, Predicate filter) which has a time complexity of O(n)

  • The contains method is used to check if a collection contains a specific element

Add your answer

Q4. Java 8 feature and explain about each one with examples

Ans.

Java 8 introduced several new features such as lambda expressions, functional interfaces, streams, and default methods.

  • Lambda expressions: Allow you to pass functions as arguments to methods, making your code more concise and readable.

  • Functional interfaces: Interfaces with a single abstract method, used to implement lambda expressions.

  • Streams: Provide a way to work with sequences of elements and perform operations such as filter, map, and reduce.

  • Default methods: Allow interfa...read more

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

Q5. Find sum of distinct elements from two given array.

Ans.

Sum of distinct elements from two arrays

  • Create a set to store distinct elements from both arrays

  • Iterate through each array and add elements to the set

  • Calculate the sum of elements in the set

Add your answer

Q6. WAP to count Duplicate String using Java 8

Ans.

WAP to count Duplicate String using Java 8

  • Use Java 8 Stream API to group and count duplicate strings

  • Create a Map to store the count of each string

  • Filter the map to get only the strings with count > 1

  • Return the size of the filtered map as the number of duplicate strings

Add your answer
Are these interview questions helpful?

Q7. Create Custom annotation

Ans.

Custom annotations can be created using @interface in Java.

  • Create a new interface with @interface keyword

  • Add required elements and default values

  • Use the annotation by adding @ followed by the annotation name

  • Example: @CustomAnnotation(value = "example")

  • Annotations can be used for compile-time checks or runtime behavior

Add your answer

Q8. What is static storage class

Ans.

Static storage class is used to declare variables that have a lifetime throughout the program execution.

  • Variables declared with static storage class are initialized only once and retain their value between function calls.

  • They have a default value of 0 if not initialized explicitly.

  • Static functions and variables are only visible within the file they are declared in.

  • Static variables can be used to count the number of times a function is called or to cache values for future use.

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

Q9. Approach to resolve memory leak

Ans.

Memory leaks can be resolved by identifying the source of the leak and freeing up the allocated memory.

  • Use memory profiling tools to identify the source of the leak

  • Analyze the code to find any unnecessary memory allocations

  • Ensure all allocated memory is freed up after use

  • Use smart pointers or garbage collection to automate memory management

  • Test thoroughly to ensure the issue is resolved

Add your answer

Q10. Memory management in Java 8

Ans.

Java 8 uses automatic memory management through garbage collection.

  • Java 8 uses a garbage collector to automatically manage memory.

  • The garbage collector frees up memory by removing objects that are no longer in use.

  • Java 8 introduced the G1 garbage collector which is designed to reduce pause times.

  • Developers can also use tools like jmap and jstat to monitor memory usage.

Add your answer

Q11. Approach to resolve memory

Ans.

Memory issues can be resolved by identifying and fixing memory leaks, optimizing memory usage, and using appropriate data structures.

  • Identify and fix memory leaks using tools like Valgrind or AddressSanitizer

  • Optimize memory usage by reducing unnecessary allocations and deallocations

  • Use appropriate data structures like arrays, linked lists, and hash tables

  • Avoid using global variables and excessive recursion

  • Consider using garbage collection or smart pointers in certain cases

Add your answer

More about working at Luxoft

#1 Best IT/ITES Company - 2022
HQ - Zug, Switzerland, Switzerland
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at null

based on 3 interviews in the last 1 year
Interview experience
3.0
Average
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Software Engineer Interview Questions from Similar Companies

3.6
 • 91 Interview Questions
4.3
 • 18 Interview Questions
4.1
 • 17 Interview Questions
3.4
 • 12 Interview Questions
4.0
 • 10 Interview Questions
3.6
 • 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
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