Add office photos
Employer?
Claim Account for FREE

Xtranet Technologies

3.2
based on 82 Reviews
Filter interviews by

10+ Mayfair Housing Interview Questions and Answers

Updated 1 Aug 2024

Q1. What is immutable and how we can create our own immutable class ?

Ans.

Immutable objects are those whose state cannot be changed after creation.

  • Use final keyword to make class immutable

  • Make all fields private and final

  • Do not provide setter methods

  • If a field is mutable, return a copy of it instead of the original object

  • Examples: String, Integer, LocalDate

Add your answer

Q2. What is singleton and how to create singleton class and benefits ?

Ans.

Singleton is a design pattern that restricts the instantiation of a class to one object.

  • To create a singleton class, make the constructor private, create a static method to get the instance of the class, and create a private static variable to hold the instance.

  • Benefits of singleton include ensuring only one instance of the class exists, providing a global point of access to the instance, and reducing the number of objects created in the system.

  • Example: java.lang.Runtime is a...read more

Add your answer

Q3. What is volatile ? And write program

Ans.

Volatile is a keyword in Java used to indicate that a variable's value may be modified by multiple threads.

  • Volatile variables are not cached in thread's local memory

  • Changes made to volatile variables are immediately visible to other threads

  • Volatile keyword is used to ensure visibility and ordering of variables in multithreaded environment

  • Example: volatile int count = 0;

Add your answer

Q4. Difference between @component and @configuration ?

Ans.

The @Component annotation is used to mark a class as a bean, while @Configuration is used to define a configuration class.

  • The @Component annotation is used to auto-detect and auto-configure beans using classpath scanning.

  • @Configuration classes are used to define beans and their dependencies explicitly.

  • A @Configuration class can contain @Bean methods that return bean instances.

  • A @Component class can be used as a bean in a Spring application context.

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

Q5. Write a program for customise exception

Ans.

A program to create custom exceptions in Java.

  • Create a class that extends Exception or RuntimeException

  • Add constructors to the custom exception class

  • Throw the custom exception in the code when needed

Add your answer

Q6. How microservices communicate?

Ans.

Microservices communicate through lightweight protocols like HTTP/REST or messaging systems like RabbitMQ.

  • Microservices can communicate through synchronous protocols like HTTP/REST, where one service sends a request to another service and waits for a response.

  • Microservices can also communicate through asynchronous messaging systems like RabbitMQ, where one service publishes a message to a queue and other services consume the message when they are ready.

  • Microservices can use l...read more

View 1 answer
Are these interview questions helpful?

Q7. Count dublicate name in SQL .

Ans.

To count duplicate names in SQL, use the GROUP BY clause with the COUNT function.

  • Use GROUP BY clause to group the names together

  • Use COUNT function to count the number of occurrences

  • Use HAVING clause to filter out names with count less than 2

Add your answer

Q8. New features of java 1.8

Ans.

Java 1.8 introduced lambda expressions, default methods, and functional interfaces.

  • Lambda expressions allow functional programming in Java.

  • Default methods allow adding new methods to interfaces without breaking existing implementations.

  • Functional interfaces are interfaces with a single abstract method, used for lambda expressions.

  • Stream API for processing collections and arrays.

  • Date and Time API for easier handling of date and time.

  • Nashorn JavaScript engine for embedding Java...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟
Asked in
NET Interview

Q9. what is difference between primary and unique key

Ans.

Primary key uniquely identifies each record in a table, while unique key ensures that each value in a column is unique.

  • Primary key does not allow NULL values, while unique key allows one NULL value.

  • A table can have only one primary key, but multiple unique keys.

  • Primary key automatically creates a unique index, while unique key does not.

  • Primary key is used to establish relationships between tables, while unique key is used to enforce data integrity.

Add your answer

Q10. How do you secure firewall

Ans.

Securing a firewall involves configuring access control, implementing intrusion detection systems, and regularly updating security policies.

  • Configure access control lists to allow only necessary traffic

  • Implement intrusion detection systems to monitor for suspicious activity

  • Regularly update firewall rules and security policies to address new threats

  • Enable logging and monitoring to track firewall activity

  • Use strong authentication methods for accessing the firewall

  • Regularly revi...read more

View 1 answer

Q11. How to sustain project

Ans.

To sustain a project, it is important to have clear goals, effective communication, stakeholder engagement, risk management, and continuous monitoring.

  • Set clear project goals and objectives to keep the team focused.

  • Maintain open and effective communication channels with all stakeholders.

  • Engage stakeholders throughout the project to ensure their buy-in and support.

  • Implement a robust risk management plan to identify and mitigate potential issues.

  • Continuously monitor project pro...read more

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

Interview Process at Mayfair Housing

based on 5 interviews
Interview experience
4.4
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.5
 • 412 Interview Questions
3.9
 • 362 Interview Questions
4.1
 • 258 Interview Questions
4.1
 • 231 Interview Questions
3.9
 • 154 Interview Questions
View all
Top Xtranet Technologies 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

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