i
Northcorp
Software
Filter interviews by
JavaMail is an API for sending and receiving emails in Java applications, supporting various protocols like SMTP, IMAP, and POP3.
JavaMail API allows developers to send and receive emails programmatically.
It supports multiple protocols: SMTP for sending, IMAP and POP3 for receiving.
Example of sending an email using JavaMail: Properties props = new Properties(); props.put('mail.smtp.host', 'smtp.example.com'...
Multithreading is a programming technique that allows concurrent execution of two or more threads for improved performance.
Multithreading enables parallel execution, improving application responsiveness.
Java provides built-in support for multithreading through the Thread class and Runnable interface.
Example: A web server can handle multiple client requests simultaneously using threads.
Synchronization is crucial to...
Inheritance is a fundamental OOP concept allowing a class to inherit properties and methods from another class.
Promotes code reusability by allowing a new class (subclass) to use methods and attributes of an existing class (superclass).
Supports method overriding, enabling subclasses to provide specific implementations of methods defined in the superclass.
Facilitates a hierarchical classification of classes, making...
SDLC (Software Development Life Cycle) is a structured process for developing software applications efficiently.
1. Requirement Analysis: Gathering and analyzing user requirements.
2. Planning: Defining the scope, resources, and timeline for the project.
3. Design: Creating architecture and design specifications for the software.
4. Implementation: Writing and compiling the code based on design specifications.
5. Testi...
Java API stands for Java Application Programming Interface, which provides a set of pre-written code for common tasks in Java programming.
Java API includes classes, interfaces, packages, and methods that developers can use to interact with the Java programming language.
It simplifies the development process by providing ready-to-use components for tasks like file handling, networking, database connectivity, and mor...
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.
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
D/W HashMap is a standard map, while ConcurrentHashMap is thread-safe for concurrent access in Java.
HashMap allows null keys and values, while ConcurrentHashMap does not allow null keys or values.
HashMap is not synchronized, making it unsuitable for concurrent use without external synchronization.
ConcurrentHashMap uses a lock striping technique, allowing concurrent read and write operations.
Example of HashMap: Has...
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)
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...
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
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 '==' 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 42 interview experiences
based on 46 reviews
Rating in categories
Devops Engineer
9
salaries
| ₹1.5 L/yr - ₹6.8 L/yr |
Software Developer
8
salaries
| ₹2 L/yr - ₹4.5 L/yr |
Senior Software Engineer
7
salaries
| ₹8.4 L/yr - ₹27 L/yr |
Senior Java Developer
6
salaries
| ₹14 L/yr - ₹22 L/yr |
Software Engineer
5
salaries
| ₹1 L/yr - ₹11.3 L/yr |
Zidio Development
Accel Frontline
Elentec Power India (EPI) Pvt. Ltd.
HyScaler