Premium Employer

Xoriant

4.0
based on 1.7k Reviews
Filter interviews by

20+ Interview Questions and Answers

Updated 29 Aug 2024
Popular Designations

Q1. String is immutable but what happens if we assign another value to that string reference

Ans.

Assigning another value to a string reference creates a new string object in memory.

  • Assigning a new value to a string reference creates a new string object in memory

  • The original string object remains unchanged

  • The new value is stored in a different memory location

  • The old value may be garbage collected if there are no other references to it

View 2 more answers

Q2. try{...}finally{..} what happens if exception thrown from try block

Ans.

The finally block will always execute, even if an exception is thrown from the try block.

  • The finally block is used to execute code that should always run, regardless of whether an exception is thrown or not.

  • If an exception is thrown from the try block, the code in the finally block will still execute.

  • This is useful for cleaning up resources, such as closing files or database connections.

  • Example: try { // code that may throw an exception } finally { // code that should always ...read more

Add your answer

Q3. how to get unique values from the collection using stream

Ans.

To get unique values from a collection using stream, use the distinct() method.

  • Call the distinct() method on the stream of the collection.

  • The distinct() method returns a stream of unique elements.

  • Use the collect() method to convert the stream back to a collection.

Add your answer

Q4. difference between == and equals

Ans.

The '==' operator compares the reference of objects, while the 'equals' method compares the content of objects.

  • The '==' operator checks if two objects refer to the same memory location.

  • The 'equals' method compares the content of objects based on their implementation.

  • The 'equals' method can be overridden to provide custom comparison logic.

  • Example: String str1 = new String('hello'); String str2 = new String('hello'); str1 == str2 will be false, but str1.equals(str2) will be tru...read more

View 3 more answers
Discover null interview dos and don'ts from real experiences

Q5. difference between lambda expression and method reference

Ans.

Lambda expression is an anonymous function while method reference refers to an existing method

  • Lambda expression is used to create an instance of a functional interface

  • Method reference is used to refer to an existing method of a class or object

  • Lambda expression uses the arrow operator (->) to separate the parameters and the body

  • Method reference uses the double colon (::) operator to separate the class or object and the method name

Add your answer

Q6. Coding Challenge (JS) - determine if words in given array are anagram or not

Ans.

Determines if words in given array are anagram or not using JS

  • Create a function that takes an array of strings as input

  • Loop through the array and sort each string alphabetically

  • Compare the sorted strings to check if they are equal

  • Return true if all strings are anagrams, else false

Add your answer
Are these interview questions helpful?

Q7. Coding challenge (JS) - remove duplicate entries from array

Ans.

Remove duplicate entries from array of strings using JavaScript

  • Use Set to remove duplicates

  • Convert Set back to array

  • Use spread operator to convert Set to array

Add your answer

Q8. tell me about JIT compiler

Ans.

JIT compiler stands for Just-In-Time compiler. It dynamically compiles code during runtime for improved performance.

  • JIT compiler translates bytecode into machine code at runtime

  • It optimizes code execution by identifying frequently executed code and compiling it

  • Examples include the JIT compilers used in Java Virtual Machine (JVM) and .NET Common Language Runtime (CLR)

View 1 answer
Share interview questions and help millions of jobseekers 🌟

Q9. fail fast and fail safe in java with examples

Ans.

Fail fast and fail safe are two error handling techniques in Java.

  • Fail fast approach detects errors as early as possible and stops the program execution immediately.

  • Fail safe approach handles errors gracefully and continues program execution.

  • Examples of fail fast include NullPointerException and ArrayIndexOutOfBoundsException.

  • Examples of fail safe include using try-catch blocks and logging errors instead of throwing exceptions.

Add your answer

Q10. Describe AWS tier architecture, Loadbalacer and S3.

Ans.

AWS tier architecture includes Load Balancer for distributing traffic and S3 for scalable storage.

  • AWS tier architecture consists of multiple layers such as presentation, application, and data tiers.

  • Load Balancer helps distribute incoming traffic across multiple instances to ensure optimal resource utilization and prevent overload.

  • S3 (Simple Storage Service) is a scalable storage solution offered by AWS for storing and retrieving data.

  • S3 allows for easy management of data thro...read more

Add your answer

Q11. what is concurrent hashmap

Ans.

ConcurrentHashMap is a thread-safe implementation of the Map interface in Java.

  • It allows multiple threads to access and modify the map concurrently without any external synchronization.

  • It achieves this by dividing the map into segments, each of which can be locked independently.

  • It provides better performance than synchronized HashMap for concurrent access.

  • It is part of the java.util.concurrent package in Java.

  • Example: ConcurrentHashMap map = new ConcurrentHashMap<>();

Add your answer

Q12. internal working of hashmap and hashset

Ans.

Hashmap and Hashset are data structures used to store key-value pairs and unique values respectively.

  • Hashmap uses hashing to store key-value pairs in an array. The hash function is used to map the key to an index in the array.

  • Hashset is similar to Hashmap but only stores unique values. It uses hashing to store values in an array.

  • Both Hashmap and Hashset have constant time complexity for insertion, deletion, and retrieval operations.

  • Hashmap allows null values and one null key,...read more

Add your answer

Q13. What are the migration projects handle

Ans.

Migration projects involve moving data, applications, or infrastructure from one system to another.

  • Migration of data from on-premises servers to cloud storage

  • Upgrading software versions and transferring data to new systems

  • Moving applications from one platform to another, such as from Windows to Linux

  • Consolidating multiple databases into a single system

Add your answer

Q14. difference between sleep and wait

Ans.

Sleep pauses the execution of a thread for a specified time, while wait pauses the execution until a specific condition is met.

  • Sleep is a static method of the Thread class, while wait is an instance method of the Object class.

  • Sleep is used to introduce a delay in the execution of a thread, while wait is used to wait for a specific condition to be met.

  • Sleep releases the lock on the object, while wait does not release the lock.

  • Sleep can be interrupted by another thread, while w...read more

Add your answer

Q15. Internal working of concurrent hashmap

Ans.

Concurrent hashmap allows multiple threads to access and modify the map concurrently.

  • Concurrent hashmap is thread-safe and uses internal locking mechanisms to ensure consistency.

  • It uses a technique called 'lock striping' to divide the map into multiple segments, each with its own lock.

  • This allows multiple threads to access different segments of the map concurrently without blocking each other.

  • Concurrent hashmap also uses a technique called 'resizing' to dynamically adjust the...read more

Add your answer

Q16. Iterator and list iterator difference

Ans.

Iterator is a general interface while ListIterator is specific to List interface.

  • Iterator can traverse any collection while ListIterator can traverse only List.

  • ListIterator can traverse in both directions while Iterator can traverse only forward.

  • ListIterator has additional methods like add(), set(), previous(), etc.

  • Iterator is used for read-only access while ListIterator is used for both read and write access.

Add your answer

Q17. Serialization in java

Ans.

Serialization is the process of converting an object into a stream of bytes to store or transmit it.

  • Java provides Serializable interface to enable serialization of objects.

  • Serialization can be used for caching, deep cloning, and remote method invocation.

  • Deserialization is the process of converting a stream of bytes back into an object.

  • Java also provides Externalizable interface for custom serialization.

  • Serialization can be controlled using transient and static fields.

Add your answer

Q18. What azure service you worked

Ans.

I have worked with Azure App Services, Azure Functions, Azure SQL Database, and Azure Blob Storage.

  • Azure App Services for hosting web applications

  • Azure Functions for serverless computing

  • Azure SQL Database for relational database management

  • Azure Blob Storage for storing unstructured data

Add your answer

Q19. Tell about oops concept

Ans.

Object-oriented programming paradigm focusing on objects and classes for code organization and reusability.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (class)

  • Inheritance: Ability of a class to inherit properties and behavior from another class

  • Polymorphism: Ability to present the same interface for different data types

Add your answer

Q20. Diff types of constructor

Ans.

Different types of constructors in object-oriented programming

  • Default constructor: no parameters

  • Parameterized constructor: accepts parameters

  • Copy constructor: creates a new object as a copy of an existing object

  • Static constructor: used to initialize static data members of a class

  • Private constructor: restricts the instantiation of a class to within the class itself

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

Interview Process at null

based on 7 interviews in the last 1 year
1 Interview rounds
Technical Round
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.8
 • 37 Interview Questions
3.7
 • 20 Interview Questions
4.4
 • 16 Interview Questions
3.7
 • 12 Interview Questions
3.9
 • 11 Interview Questions
4.0
 • 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