Coupa Software Inc
10+ Marriott International Interview Questions and Answers
Q1. Which 2 methods must an object implement in order to be used as a key in hasmap and why
The object must implement the hashCode() and equals() methods to be used as a key in a hashmap.
hashCode() method is used to generate a unique hash code for the object.
equals() method is used to compare two objects for equality.
Both methods are necessary for proper functioning of hashmap operations like put() and get().
Q2. How to automate dynamic pages, find XPaths.
Automating dynamic pages and finding XPaths involves using tools like Selenium and identifying unique attributes.
Use Selenium WebDriver to interact with dynamic elements on the page.
Identify unique attributes like IDs, classes, or other attributes to create stable XPaths.
Use relative XPaths to locate elements based on their relationship to other elements.
Regularly update and maintain XPaths to ensure they remain accurate as the page changes.
Q3. Is it preferable to use stringBuffer with its synchronized methods or stringBuilder when implementing toString() method? why?
Use stringBuilder for toString() method as it is faster and not thread-safe.
stringBuilder is faster than stringBuffer as it is not thread-safe
toString() method is used for converting an object to a string
If thread-safety is required, use stringBuffer instead
Example: StringBuilder sb = new StringBuilder(); sb.append("Hello"); sb.append("World"); return sb.toString();
Q4. is it good idea to wrap java.io.FileInputStream and java.io.FileOutputStream in buffered writers and readers and why?
Yes, it is a good idea to wrap FileInputStream and FileOutputStream in buffered writers and readers.
Buffered streams improve performance by reducing the number of I/O operations
Buffered streams also provide additional functionality like readLine() and newLine()
Buffered streams can be chained together for even better performance
Example: BufferedReader br = new BufferedReader(new FileReader(file));
Q5. Write test case around a microservice which schedules messages.
Test case for a microservice scheduling messages
Verify that messages are scheduled correctly based on specified time
Check if messages are sent to the correct recipients
Ensure that messages are not duplicated or lost during scheduling
Q6. Expalin Architecture of your product
Our product follows a microservices architecture with a combination of front-end, back-end, and database layers.
Utilizes microservices architecture for scalability and flexibility
Front-end layer handles user interface and interactions
Back-end layer manages business logic and data processing
Database layer stores and retrieves data efficiently
Communication between layers is done through APIs
Q7. What is overloading and overriding
Overloading is having multiple methods in the same class with the same name but different parameters. Overriding is implementing a method in a subclass that is already defined in the parent class.
Overloading allows a class to have multiple methods with the same name but different parameters.
Overriding involves implementing a method in a subclass that is already defined in the parent class.
Overloading is resolved at compile time while overriding is resolved at runtime.
Q8. Different type of testing
Different types of testing include unit testing, integration testing, system testing, and acceptance testing.
Unit testing focuses on testing individual components or modules of the software.
Integration testing involves testing how different modules work together.
System testing tests the entire system as a whole.
Acceptance testing is done to ensure the software meets the requirements of the end users.
Q9. Explain Product
A product is a tangible or intangible item that is created and offered for sale.
Products can be physical goods, such as electronics or clothing.
Products can also be services, such as software or consulting.
Products are designed to meet a specific need or want of a customer.
Products go through a lifecycle of development, launch, growth, maturity, and decline.
Q10. What is oops in java
Object-oriented programming concepts in Java
OOPs stands for Object-Oriented Programming
It is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures
Encapsulation, Inheritance, Polymorphism, and Abstraction are the four main principles of OOPs in Java
Example: Class, Object, Inheritance, Polymorphism, Encapsulation
Q11. What is jvm in java
JVM stands for Java Virtual Machine, which is an abstract computing machine that enables a computer to run Java programs.
JVM is responsible for converting Java bytecode into machine code that can be executed by the computer's processor.
It provides a platform-independent execution environment for Java programs.
JVM manages memory, handles garbage collection, and provides security features for Java applications.
Examples of JVM implementations include Oracle HotSpot, OpenJ9, and ...read more
Q12. Write rest APIs of project
Develop REST APIs for project functionality
Define endpoints for different functionalities (e.g. GET /users, POST /users)
Implement CRUD operations using HTTP methods (GET, POST, PUT, DELETE)
Use proper authentication and authorization mechanisms (e.g. JWT tokens)
Handle error responses and status codes appropriately (e.g. 404 Not Found, 500 Internal Server Error)
More about working at Coupa Software Inc
Interview Process at Marriott International
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month