Filter interviews by
I applied via Naukri.com and was interviewed in Jun 2024. There was 1 interview round.
ref is used for passing a variable by reference, out is used for returning a value from a method
ref is used to pass a variable as a reference to a method, allowing the method to modify the variable
out is used to return a value from a method, even if the method does not return a value explicitly
ref variables must be initialized before passing to a method, out variables do not need to be initialized
Top trending discussions
posted on 9 Jan 2025
I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.
I applied via Naukri.com and was interviewed in Oct 2024. There was 1 interview round.
JVM is the virtual machine that runs Java bytecode, JRE is the runtime environment for Java programs, and JDK is the development kit for creating Java applications.
JVM (Java Virtual Machine) is responsible for running Java bytecode on different platforms.
JRE (Java Runtime Environment) includes JVM, libraries, and other components necessary to run Java applications.
JDK (Java Development Kit) is a software development ki...
String is immutable in Java to ensure security, thread safety, and optimization.
Immutable strings prevent accidental changes to sensitive data like passwords.
Immutable strings allow for safe sharing of string literals across multiple threads.
Immutable strings enable string pooling for memory optimization.
Example: String str = "Hello"; str.concat(" World"); // str remains "Hello"
I applied via Walk-in and was interviewed in Oct 2024. There was 1 interview round.
Def factorial_iterative(n):
result = 1
for i in range(1, n + 1):
result *= i
return result
posted on 19 Sep 2024
I applied via Naukri.com and was interviewed in Aug 2024. There was 1 interview round.
Overloading is having multiple methods with the same name but different parameters, while overriding is implementing a method in a subclass with the same signature as in the superclass.
Overloading allows different methods to have the same name but different parameters.
Overriding involves implementing a method in a subclass with the same signature as in the superclass.
Overloading is determined at compile time based on t...
I applied via Naukri.com and was interviewed in Apr 2024. There were 3 interview rounds.
SAGA pattern is a design pattern used in microservices architecture to manage distributed transactions.
SAGA pattern breaks down a long-running transaction into a series of smaller, independent transactions.
Each step in the SAGA pattern is a separate service that communicates with other services through events.
If a step fails, compensating transactions are executed to rollback the changes made by previous steps.
Example:...
API stands for Application Programming Interface. It defines the methods and data formats that applications can use to communicate with each other.
API is a set of rules and protocols that allows different software applications to communicate with each other.
To secure an API, you can use authentication methods like OAuth, API keys, or JWT tokens.
Implementing encryption (HTTPS) and rate limiting can also enhance API secu...
posted on 29 May 2024
Find duplicate characters in a given array of strings
Iterate through each string in the array
For each string, iterate through each character and store the count in a hashmap
If the count of any character is greater than 1, it is a duplicate
Code for REST API using Spring Boot with annotations
Use @RestController annotation to define the class as a REST controller
Use @RequestMapping annotation to map HTTP requests to handler methods
Use @GetMapping, @PostMapping, @PutMapping, @DeleteMapping annotations for specific HTTP methods
Use @PathVariable annotation to extract values from the URI
Use @RequestBody annotation to bind HTTP request body to a method paramete
posted on 10 Jul 2024
Print 'hello world!!' in three separate lines.
Use a programming language's print function to output 'hello' on the first line, 'world' on the second line, and '!!' on the third line.
In JavaScript, you can achieve this using console.log() function with line breaks like console.log('hello\nworld\n!!');
I was interviewed in Aug 2023.
A simple program to print 'fizz' for multiples of 3, 'buzz' for multiples of 5, and 'fizzbuzz' for multiples of both.
Iterate through numbers from 1 to n.
Use modulo operator to check divisibility by 3 and 5.
Print 'fizz', 'buzz', or 'fizzbuzz' accordingly.
Yes, classes implementing an interface must implement interface methods.
Classes implementing an interface must provide concrete implementations for all methods declared in the interface.
Failure to implement all interface methods will result in a compilation error.
Interfaces are used to define a contract that implementing classes must adhere to.
Associate Consultant
5
salaries
| ₹1.9 L/yr - ₹3 L/yr |
Management Consultant
5
salaries
| ₹33 L/yr - ₹57 L/yr |
Consultant
4
salaries
| ₹6.6 L/yr - ₹12 L/yr |
HR Manager
4
salaries
| ₹2.2 L/yr - ₹4.5 L/yr |
Senior Consultant
4
salaries
| ₹26.9 L/yr - ₹49 L/yr |
TCS
Infosys
Wipro
HCLTech