More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Interview Questions and Answers for 'Amdocs' - 35 question(s) found - Order By Newest
Very frequently asked. Among first few questions in almost all interviews. Among Top 5 frequently asked questions. Frequently asked in Indian service companies (HCL,TCS,Infosys,Capgemini etc based on multiple feedback ) and Epam Systems
Ans. "equals" is the method of object class which is supposed to be overridden to check object equality, whereas "==" operator evaluate to see if the object handlers on the left and right are pointing to the same object in memory.
x.equals(y) means the references x and y are holding objects that are equal. x==y means that the references x and y have same object.
Sample code:
String x = new String("str");
String y = new String("str");
System.out.println(x == y); // prints false
System.out.println(x.equals(y)); // prints true
Ans. OOPs or Object Oriented Programming is a Programming model which is organized around Objects instead of processes. Instead of a process calling series of processes, this model stresses on communication between objects. Objects that all self sustained, provide security by encapsulating it's members and providing abstracted interfaces over the functions it performs. OOP's facilitate the following features
1. Inheritance for Code Reuse
2. Abstraction for modularity, maintenance and agility
3. Encapsulation for security and protection
4. Polymorphism for flexibility and interfacing
Help us improve. Please let us know the company, where you were asked this question :
Ans. public static void main(String ar[])
{
int n=5;
if((n/2)*2==n)
{
System.out.println("Even Number ");
}
else
{
System.out.println("Odd Number ");
}
}
Help us improve. Please let us know the company, where you were asked this question :
Ans. MVC is a Design Pattern that facilititates loose coupling by segregating responsibilities in a Web application
1. Controller receives the requests and handles overall control of the request
2. Model holds majority of the Business logic, and
3. View comprise of the view objects and GUI component
Help us improve. Please let us know the company, where you were asked this question :
Ans. Iterators in java are used to iterate over the Collection objects.
Fail-Fast iterators immediately throw ConcurrentModificationException if there is any addition, removal or updation of any element.
Fail-Safe iterators don't throw any exception if a collection is structurally modified while iterating over it. This is because, they operate on the clone of the collection and not on the original collection.
Help us improve. Please let us know the company, where you were asked this question :
Ans. An interface without any method declaration is called as marker interface. there are 3 in-built interfaces in JVM i.e. serializable, clonable, remote
Help us improve. Please let us know the company, where you were asked this question :
Ans. JSON is "JavaScript Object Notation", primarily used for client-server or server-server communication. Its a much lighter and readable alternative to XML. JSON is language independent and is easily parse-able in all programming languages.
Help us improve. Please let us know the company, where you were asked this question :
Q15. Explain Application / Server architecture being used in your project ?
or
Explain your project architecture ?
Ans. We are using cluster of Web servers and Application servers. Load Balancer is used to manage the load between them. Down the layer we have middleware server and then DB server to access database.
Help us improve. Please let us know the company, where you were asked this question :
Ans. There was no multiple inheritance in java before version 8 as implementing multiple interfaces cannot be termed as inheritance.
With Java 8 , came the concept of default methods wherein the class implementing the interface carries the default implementation from the interface and hence facilitating multiple inheritance.
Help us improve. Please let us know the company, where you were asked this question :
Ans. When a DML is executed, the changes only stays in session and still not pushed to DB Tables, Commit is used to push those changes to the Tables.
In case we realize that we don't want to commit those changes and would like to ignore them, we can use rollback.
For example - You may like that for a banking transaction you would like to update the account balance only if the debit or credit record was correctly inserted, so you may like to encapsulate both DML's - insert for transaction and update for balance in a single transaction and would only commit if both succeeds else rollback.
Help us improve. Please let us know the company, where you were asked this question :
Ans. public static int getLevel(Node root, int key) {
int levelOfNode = getLevelUtil(root, key, 1);
return levelOfNode;
}
public static int getLevelUtil(Node root, int key, int level) {
if (root == null) return 0;
if (root.data == key) return level;
int left = getLevelUtil(root.left, key, level 1);
int right = getLevelUtil(root.right, key, level 1);
if (left != 0) return left;
else return right;
}
Help us improve. Please let us know the company, where you were asked this question :
Ans. we use serialization when we send response to client in JSON format.(the process of converting model object into json is nothing but serialization
Help us improve. Please let us know the company, where you were asked this question :
Ans. By using map , you can transform the object values. The map operation allows us to apply a function, that takes input parameter of one type, and returns something else.
Filter is used for filtering the data, it always returns the boolean value. If it returns true, then item is added to list else its filtered out (ignored)
Help us improve. Please let us know the company, where you were asked this question :