Eidiko Systems Integrators
The Eternal Organisation Interview Questions and Answers
Q1. Can we pass arguments in place of args... In string [] args .
Yes, we can pass arguments in place of args in string[] args.
Arguments can be passed directly as an array of strings.
The number of arguments passed must match the size of the array.
Example: public static void main(String[] args) can be called as main(new String[] {"arg1", "arg2"});
Q2. 1)What is python 2)what is an areay 3)two basic coding question
Python is a high-level, interpreted programming language known for its simplicity and ease of use.
Python is used for web development, data analysis, artificial intelligence, and more.
An array is a collection of elements of the same data type, accessed using an index.
Two basic coding questions could be finding the sum of two numbers or reversing a string.
Q3. Reverse the given string without using loop.
The given string can be reversed using recursion.
Use a recursive function to reverse the string.
The base case of the recursion would be an empty string.
In each recursive call, remove the first character of the string and append it to the reversed substring.
Q4. Difference between stringBuilder and stringbuffer?
stringBuilder and stringBuffer are both used to manipulate strings, but stringBuilder is faster and not thread-safe while stringBuffer is slower and thread-safe.
Both classes are used to manipulate strings.
stringBuilder is faster than stringBuffer.
stringBuffer is thread-safe while stringBuilder is not.
Use stringBuilder when you don't need thread-safety and performance is important.
Use stringBuffer when you need thread-safety.
Q5. String are immutable?
Yes, strings are immutable in most programming languages.
Immutable means that once a string is created, it cannot be modified.
Any operation that appears to modify a string actually creates a new string.
This can lead to performance issues when working with large strings or in loops.
Examples of languages with immutable strings include Java, Python, and Ruby.
Q6. Program based on substring
A program that searches for a substring in an array of strings.
Create a function that takes an array of strings and a substring as parameters
Loop through the array and check if the substring is present in each string
Return an array of strings that contain the substring
Q7. What is constructor?
Constructor is a special method that is used to initialize objects in Java.
Constructors have the same name as the class they belong to.
They are called automatically when an object is created.
They can be overloaded to accept different parameters.
They do not have a return type.
Example: public class Car { public Car() { // constructor code here } }
Q8. 2 largest number in array
Find the 2 largest numbers in an array of strings.
Convert the strings to integers before comparing.
Use a sorting algorithm to sort the array in descending order.
Retrieve the first two elements in the sorted array.
Top HR Questions asked in The Eternal Organisation
Interview Process at The Eternal Organisation
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month