Yodlee
Zocket Technologies Interview Questions and Answers
Q1. Prime Numbers Identification
Given a positive integer N
, your task is to identify all prime numbers less than or equal to N
.
Explanation:
A prime number is a natural number greater than 1 that has no positive d...read more
Identify all prime numbers less than or equal to a given positive integer N.
Iterate from 2 to N and check if each number is prime
Use the Sieve of Eratosthenes algorithm for better efficiency
Optimize by only checking up to the square root of N for divisors
Q2. Palindrome String Validation
Determine if a given string 'S' is a palindrome, considering only alphanumeric characters and ignoring spaces and symbols.
Note:
The string 'S' should be evaluated in a case-insensi...read more
Check if a given string is a palindrome after removing special characters, spaces, and converting to lowercase.
Remove special characters and spaces from the string
Convert the string to lowercase
Check if the modified string is a palindrome by comparing characters from start and end
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 with implementation.
Interface can only have abstract methods and constants.
A class can implement multiple interfaces but can only extend one abstract class.
Example: Abstract class - Animal with abstract method 'eat', Interface - Flyable with method 'fly'.
Error is a serious issue that cannot be handled at runtime, while Exception is a recoverable issue that can be caught and handled.
Error is a subclass of Throwable and is usually caused by the environment or system, such as running out of memory or stack overflow.
Exception is also a subclass of Throwable but is caused by the application code, such as invalid input or file not found.
Errors are unchecked and are not meant to be caught or handled by the application, while Excepti...read more
Requirements for creating an immutable class in Java
Make the class final so it cannot be extended
Make all fields private and final
Do not provide setter methods, only getter methods
Ensure that mutable objects are not returned in getter methods
Override equals() and hashCode() methods for proper comparison
Consider making defensive copies of mutable fields in constructor or getter methods
Static methods belong to the class itself, while instance methods belong to individual objects of the class.
Static methods are called using the class name, while instance methods are called using object references.
Static methods cannot access instance variables directly, while instance methods can access both static and instance variables.
Static methods are shared among all instances of the class, while instance methods are unique to each object.
Example: Math.max() is a stati...read more
ClassNotFoundException occurs when a class is not found during runtime, while NoClassDefFoundError occurs when a class was found during compilation but not during runtime.
ClassNotFoundException is a checked exception, while NoClassDefFoundError is an Error.
ClassNotFoundException occurs when a class is not found at runtime, usually due to a missing classpath or incorrect class name.
NoClassDefFoundError occurs when a class was found during compilation but not found during runti...read more
SerialVersionUID is a unique identifier used by Java to ensure the compatibility of serialized objects.
SerialVersionUID is a static final long variable in a class that implements Serializable interface.
It is used to ensure that the serialized object can be deserialized correctly even if the class definition has changed.
If the SerialVersionUID of the serialized object does not match the one in the class, an InvalidClassException is thrown.
It is recommended to explicitly declar...read more
More about working at Yodlee
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month