Zscaler Softech
Phonographic Performance Interview Questions and Answers
Q1. How to create singleton ensuring reflection does not mess up the implementation
To create a singleton ensuring reflection does not mess up the implementation, use an enum or a private constructor with a static field.
Use an enum to create a singleton as enums are inherently singletons and cannot be instantiated multiple times.
Alternatively, use a private constructor with a static field to create a singleton.
To prevent reflection from creating multiple instances, throw an exception in the constructor if an instance already exists.
Q2. Swap character from uppercase to lowercase and lowercase to uppercase Zscalar ->zSCALAR without using 1.util function 2.arithimatic operator 3.map 4.array function
Swap characters from uppercase to lowercase and lowercase to uppercase in a given string.
Iterate through each character in the string
Check if the character is uppercase or lowercase
Swap the case of the character using bitwise XOR operation
Build the resulting string with the swapped characters
Q3. Difference. Between concurrent hash map and synchronised hashmap
ConcurrentHashMap allows multiple threads to access and modify the map concurrently, while SynchronizedHashMap ensures thread-safety by allowing only one thread to access the map at a time.
ConcurrentHashMap is more efficient in scenarios with high concurrency as it allows concurrent read and write operations.
SynchronizedHashMap is simpler to use and provides thread-safety, but can lead to performance degradation in highly concurrent environments.
ConcurrentHashMap achieves thr...read more
Q4. Semaphores in java how to implement
Semaphores in Java are used for controlling access to a shared resource. They can be implemented using the java.util.concurrent package.
Use the Semaphore class from the java.util.concurrent package
Create a Semaphore object with an initial number of permits
Use the acquire() method to acquire a permit before accessing the shared resource
Use the release() method to release a permit after accessing the shared resource
Q5. Bitmask in Postgresql how to use
Bitmask in Postgresql is used to store and manipulate multiple boolean values within a single integer column.
Bitmask is a technique to represent a set of boolean flags using binary digits.
In Postgresql, the bitwise operators (&, |, ^, ~) can be used to perform operations on bitmasks.
To set a specific flag in a bitmask, use the bitwise OR operator (|).
To check if a flag is set in a bitmask, use the bitwise AND operator (&).
To toggle a flag in a bitmask, use the bitwise XOR ope...read more
Q6. Design a login page/form
A modern and user-friendly login page with email and password fields
Include a clean and simple design with a logo and branding
Add input fields for email and password with proper validation
Include a 'Forgot Password' link for password recovery
Add a 'Remember Me' checkbox for convenience
Include a 'Sign In' button for submitting the form
Top HR Questions asked in Phonographic Performance
Interview Process at Phonographic Performance
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month