Intellect Design Arena
10+ Hlg Memorial Hospital Interview Questions and Answers
How can we achieve polymorphism in Java?
Can we use static method in an interface?
Difference between Abstract Class and Interface
Q4. 1. Exception handling in java 2. What is method overriding
Exception handling in Java is a mechanism to handle runtime errors and prevent program termination.
Java provides try, catch, and finally blocks to handle exceptions.
Checked exceptions must be caught or declared in the method signature.
Unchecked exceptions do not need to be caught or declared.
Example: try { // code that may throw exception } catch (Exception e) { // handle exception }
Example: try { // code that may throw exception } finally { // cleanup code }
Q5. Reverse string using any popular language
Reverse a string using popular programming languages
Use built-in functions like reverse() in Python
Iterate through the string in reverse order in C++
Use StringBuilder.reverse() in Java
Q6. Find length of string they give string
Use the length() function to find the length of the given string.
Use the length() function in programming languages like Java, Python, C++, etc.
For example, in Java: String str = 'hello'; int length = str.length();
Make sure to handle edge cases like empty strings or null values.
Q7. Prime number using any popular language
A prime number is a number greater than 1 that can only be divided by 1 and itself.
Use a loop to check if the number is divisible by any number other than 1 and itself
Start checking from 2 up to the square root of the number for efficiency
If the number is only divisible by 1 and itself, it is a prime number
Q8. Remove duplicatefrom string
Use a set to remove duplicates from a string
Create a set to store unique characters
Iterate through the string and add each character to the set
Convert the set back to a string to get the result
Q9. Replace characters from string
Replace characters from string with another character
Use a loop to iterate through each character in the string
Check if the character needs to be replaced and replace it with the desired character
Return the modified string
Q10. Write star pattern
Print a star pattern using loops
Use nested loops to print the desired pattern
Start with a small pattern and then increase complexity
Use '*' character to represent the stars
Example: For a simple pattern, you can use a loop to print '*' in a single line
Interview Process at Hlg Memorial Hospital
Top System Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month