Filter interviews by
Runtime polymorphism is the ability of a function to behave differently based on the object it is called with.
Runtime polymorphism is achieved through method overriding in object-oriented programming.
It allows a subclass to provide a specific implementation of a method that is already provided by its superclass.
The actual method that gets called is determined at runtime based on the type of object.
Example: Inheritance ...
Abstraction is the concept of hiding complex implementation details and showing only the necessary information to the user.
Abstraction allows developers to focus on the essential features of an object while hiding unnecessary details.
It helps in reducing complexity and improving the efficiency of the code.
For example, a car can be abstracted as a vehicle with properties like speed, fuel consumption, and color, without ...
Code to find duplicates in an array of strings
Iterate through the array and store each element in a HashSet
If an element is already in the HashSet, it is a duplicate
Return a list of duplicates found
Hashing is a process of converting input data into a fixed-size string of bytes using a hash function.
Hashing is used to securely store passwords by converting them into a hash value.
Hashing is used in data retrieval systems to quickly locate data based on a key.
Common hash functions include MD5, SHA-1, and SHA-256.
Asking the dp and tree and other
I applied via campus placement at Anna University and was interviewed in Apr 2024. There were 3 interview rounds.
General topics were given
Curd operation with SQL connectivity
I applied via Job Fair and was interviewed in Jun 2023. There were 3 interview rounds.
Ms office,Core Java , Tally , C,
In my Opinion,view , If you ask me, As far as I can see/I am Concerned , It seems to me that , I think /feel/reckon/ belive , If you want my option , What we have to decide
I applied via campus placement at CDAC, Noida and was interviewed in Jan 2022. There were 4 interview rounds.
Best way to prefer java, core java and most imp spring boot because many of companies required spring boot now a days
Path variable is used to locate executable files while classpath variable is used to locate Java classes.
Path variable is used by the operating system to locate executable files.
Classpath variable is used by Java to locate classes and resources.
Path variable is system-specific while classpath variable is Java-specific.
Path variable is set by the user while classpath variable is set by the developer.
Example of path vari...
Enum is a special data type in Java used to define a set of constants.
Enums are used to represent a fixed number of values that do not change.
They are declared using the enum keyword.
Each enum constant is an object of the enum type.
Enums can have constructors, methods, and fields.
Example: enum Color { RED, GREEN, BLUE }
Enums can also have values associated with them, like Color.RED(255, 0, 0).
2 phase commit is a protocol used to ensure distributed transactions are either committed or rolled back.
Used in distributed systems where multiple databases are involved in a transaction
Ensures all databases either commit or rollback the transaction
Involves a coordinator and multiple participants
Coordinator sends a prepare message to participants, who respond with either commit or abort
If all participants respond with...
Yes, Java is completely object oriented.
Java is designed to be completely object oriented.
All code in Java is written inside classes and objects.
Java supports encapsulation, inheritance, and polymorphism.
Java does have some non-object oriented features like primitive data types.
However, even these can be treated as objects using wrapper classes.
Exception is an event that occurs during the execution of a program and disrupts the normal flow of instructions.
Exceptions are objects that are thrown at runtime when an abnormal condition occurs
Java provides a set of predefined exceptions that can be used to handle errors
Exceptions can be caught and handled using try-catch blocks
Unchecked exceptions are those that are not checked at compile-time, while checked except
I applied via Job Portal and was interviewed in Mar 2022. There were 2 interview rounds.
2 rounds easy
I applied via Campus Placement and was interviewed in Aug 2021. There were 5 interview rounds.
Switch case is used for multiple conditions while if else is for binary conditions. Sorting can be done using various algorithms.
Switch case is faster than if else for multiple conditions
If else is more readable for binary conditions
Sorting can be done using bubble sort, insertion sort, quick sort, etc.
Example code for bubble sort: for(i=0;i
Difference between compiler and interpreter with a coding challenge
Compiler translates the entire code into machine language before execution while interpreter translates line by line during execution
Compiler generates an executable file while interpreter does not
Compiler is faster but debugging is harder while interpreter is slower but debugging is easier
Coding challenge: Write a program to find the sum of two numbers
I applied via Naukri.com and was interviewed in Dec 2020. There were 3 interview rounds.
An object is an instance of a class that encapsulates data and behavior.
Objects have attributes (data) and methods (behavior).
Objects can interact with each other through method calls.
Objects can be created from classes.
Examples of objects include a car, a person, or a bank account.
Multi threading is the ability of a program to perform multiple tasks concurrently.
It allows for better utilization of CPU resources
It can improve program performance and responsiveness
Examples include web servers handling multiple requests simultaneously
It requires careful management of shared resources to avoid race conditions
Yes, we can create multiple objects in programming.
Objects are instances of a class.
We can create multiple objects of the same class.
Each object has its own set of instance variables and methods.
Objects can interact with each other through their methods.
Example: creating multiple instances of a 'Person' class for different people.
Encapsulation types are data, procedural and combination.
Data encapsulation hides data from outside world and provides access through methods.
Procedural encapsulation hides implementation details of a procedure.
Combination encapsulation is a mix of data and procedural encapsulation.
Examples include private variables in a class, access modifiers in Java, etc.
based on 1 review
Rating in categories
TCS
Infosys
Wipro
HCLTech