Visa
10+ B E Pumps Interview Questions and Answers
Q1. how does ajax call work
Ajax calls allow for asynchronous communication between client and server without reloading the page.
Ajax stands for Asynchronous JavaScript and XML
Uses XMLHttpRequest object to send and receive data
Allows for partial page updates without reloading the entire page
Can handle data in various formats such as JSON, XML, HTML, and plain text
Example: $.ajax({url: 'example.com', success: function(data){console.log(data)}});
Q2. how do you create immutable in java
Creating immutable in Java
Use final keyword to make variables immutable
Use private constructor to prevent object modification
Use defensive copying to prevent modification of mutable objects
Use enum to create immutable objects
Use String class to create immutable strings
Q3. where have you used immutable in java
Immutable is used in Java to create objects whose state cannot be changed after creation.
Immutable objects are thread-safe and can be shared without the risk of data corruption.
Examples of immutable classes in Java include String, Integer, and LocalDate.
Immutable objects can be created using the final keyword, constructor initialization, and static factory methods.
Q4. what is observer pattern
Observer pattern is a design pattern in which an object maintains a list of its dependents and notifies them automatically of any state changes.
Also known as publish-subscribe pattern
Used in event-driven systems
Allows loose coupling between objects
Example: A weather station broadcasts weather updates to multiple displays
Example: A stock market ticker notifies multiple investors of stock price changes
Q5. difference between REST and SOAP
REST is lightweight and uses HTTP while SOAP is XML-based and has more features.
REST uses HTTP methods like GET, POST, PUT, DELETE while SOAP uses XML messaging.
REST is stateless while SOAP can maintain state.
REST is faster and easier to use while SOAP is more secure and reliable.
REST is used for web services while SOAP is used for enterprise-level services.
Example of REST: Twitter API. Example of SOAP: Amazon Web Services.
Q6. what is immutable in java
Immutable in Java refers to objects whose state cannot be changed after creation.
String, Integer, and other wrapper classes are immutable in Java.
Immutable objects are thread-safe and can be shared without synchronization.
To create an immutable class, make all fields final and private, and don't provide setters.
Examples of immutable classes in Java include LocalDate, LocalTime, and LocalDateTime.
Q7. what is dependency injection
Dependency injection is a design pattern that allows objects to receive dependencies rather than creating them internally.
It helps to decouple the code and makes it more testable and maintainable.
It allows for easier swapping of dependencies without changing the code.
There are three types of dependency injection: constructor injection, setter injection, and interface injection.
Example: Instead of creating a database connection object inside a class, the object is passed as a ...read more
Q8. what is GET and POST
GET and POST are HTTP methods used for sending data to a server.
GET is used to retrieve data from a server
POST is used to submit data to a server
GET requests can be cached and bookmarked
POST requests are not cached and cannot be bookmarked
GET requests have length restrictions
POST requests have no length restrictions
GET requests are less secure than POST requests
Q9. what is CORS
CORS stands for Cross-Origin Resource Sharing. It is a security feature implemented in web browsers to restrict access to resources from different origins.
CORS allows web servers to specify which origins are allowed to access its resources
It is implemented using HTTP headers
CORS prevents malicious websites from accessing sensitive data from other websites
Examples of resources that may be restricted by CORS include cookies, scripts, and APIs
Q10. what is singleton
Singleton is a design pattern that restricts the instantiation of a class to a single object.
Singleton ensures that only one instance of a class exists in the entire application.
It provides a global point of access to the instance.
Commonly used in scenarios where a single instance needs to coordinate actions across the system.
Example: Database connection manager, logger, configuration manager.
More about working at Visa
Top HR Questions asked in B E Pumps
Interview Process at B E Pumps
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month