i
Northcorp Software
Filter interviews by
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have constructors, member variables, and methods, while interface cannot.
A class can implement multiple interfaces but can only extend one abstract class.
Abstract classes are used to define a common behavior among subclasses, while interfaces are used to define a contract for classes to impl...
Abstract classes can have both implemented and abstract methods, while interfaces can only have abstract methods. Abstract classes support single inheritance, interfaces support multiple inheritance.
Abstract classes can have both implemented and abstract methods, providing more flexibility in design.
Interfaces can only have abstract methods, promoting a more strict contract for implementing classes.
Abstract classes sup...
Method overloading is when multiple methods in a class have the same name but different parameters.
Allows multiple methods with the same name but different parameters in a class
Parameters can differ in number, type, or order
Compile-time polymorphism
Example: void print(int a) and void print(String s)
Method overloading allows defining multiple methods with the same name but different parameters.
Methods must have different parameter types or number of parameters.
Return type does not matter for method overloading.
Example: void print(int num) and void print(String text) are valid overloads.
D/W Hashmap and ConcurrentHashmap are both implementations of the Map interface in Java, with the latter being thread-safe.
D/W Hashmap stands for 'Doubly-Linked Hashmap' and is a custom implementation of a hashmap in Java that maintains insertion order.
ConcurrentHashmap is a thread-safe implementation of the Map interface in Java, allowing multiple threads to access and modify it concurrently without causing data corru
HashMap is not synchronized and not thread-safe, while ConcurrentHashMap is thread-safe and allows concurrent access.
HashMap is not synchronized, so it is not safe to use in a multi-threaded environment without external synchronization.
ConcurrentHashMap uses internal synchronization mechanisms to ensure thread safety, allowing multiple threads to access and modify it concurrently.
ConcurrentHashMap is designed to handle...
A Java developer is responsible for designing, developing, and maintaining Java-based applications.
Designing and implementing Java applications
Writing efficient and maintainable code
Testing and debugging code
Collaborating with team members to solve technical problems
Keeping up-to-date with Java technologies and best practices
Develop, test, and maintain Java applications to ensure functionality and performance.
Write clean and efficient code following best practices
Test the application thoroughly to identify and fix bugs
Regularly update and maintain the application to meet changing requirements
Northcorp Software interview questions for designations
HashMap is not thread-safe and allows null keys/values, while ConcurrentHashMap is thread-safe and does not allow null keys/values.
HashMap is not thread-safe and can lead to ConcurrentModificationException if modified while iterating.
ConcurrentHashMap uses internal locking mechanisms to provide thread-safety.
ConcurrentHashMap does not allow null keys/values, while HashMap does.
ConcurrentHashMap is more suitable for con
Get interview-ready with Top Northcorp Software Interview Questions
JVM optimizes method calls using various techniques like inlining, escape analysis, and virtual method resolution.
JVM can inline methods by replacing the method call with the actual code, reducing overhead.
Escape analysis helps JVM determine if objects can be allocated on the stack instead of the heap.
Virtual method resolution optimizes method calls by caching the resolved method to avoid repeated lookups.
The volatile keyword in Java is used to indicate that a variable's value will be modified by different threads.
Ensures visibility of changes made by one thread to other threads
Prevents compiler optimizations that could reorder instructions
Useful for variables accessed by multiple threads without synchronization
Example: volatile boolean flag = true;
In Java, == compares memory addresses while .equals() compares the actual values of objects.
== compares memory addresses of objects
.equals() compares the actual values of objects
Use == for comparing primitive data types
Use .equals() for comparing objects like Strings
The '==' operator compares memory addresses of objects, while the .equals() method compares the content or value of objects.
Use '==' for comparing memory addresses of objects.
Use .equals() for comparing the content or value of objects.
Example: String str1 = new String("hello"); String str2 = new String("hello"); str1 == str2 will return false, but str1.equals(str2) will return true.
Java program to check if a number is prime
Create a function that takes an integer as input
Check if the number is less than 2, return false
Iterate from 2 to the square root of the number, check for divisibility
If the number is divisible by any number, return false
Otherwise, return true
A prime number is a number greater than 1 that can only be divided by 1 and itself.
Prime numbers are integers greater than 1
They have only two factors: 1 and the number itself
Examples of prime numbers: 2, 3, 5, 7, 11, 13
The final keyword in Java is used to restrict the user from changing the value of a variable, making a method not overrideable, or preventing a class from being subclassed.
Final variables cannot be reassigned once initialized
Final methods cannot be overridden in subclasses
Final classes cannot be subclassed
Final parameters in a method cannot be modified within the method
Top trending discussions
Some of the top questions asked at the Northcorp Software Java Developer interview -
based on 36 interviews
1 Interview rounds
based on 36 reviews
Rating in categories
Software Developer
10
salaries
| ₹0 L/yr - ₹0 L/yr |
Devops Engineer
9
salaries
| ₹0 L/yr - ₹0 L/yr |
Data Scientist
8
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
5
salaries
| ₹0 L/yr - ₹0 L/yr |
Java Developer
5
salaries
| ₹0 L/yr - ₹0 L/yr |
Infosys
TCS
Wipro
HCLTech