Technical Interview Questions and Answers :: Accenture
- Select All
- C
- Java
- C++
- .NET
- SQL
- Informatica
- WebMethod
- Soft. Engineering
- Data Structure
- HR Question in TR
- Operating System
- DBMS
41 / 152
Iterator allows to traverse the collection and also it has methods which enables to obatin or remove elements. ListIterator adds the feature of traversing the list bi-directionally, also modify the elememts.
Eg.: Iterator itr = al.iterator();
while(itr.hasNext()) {}
42 / 152
List is subinterface of collection interface
List is objects can be stored in sequencelly order
List objects can be stored in index or access by its index
List is preserve the order of insertion.
List duplicate objects can be stored and also null insertion is allowed.
list is 3 implemention classes
1.ArrayList Class
2.LinkedList Class
3.Vector Class
43 / 152
arrays store only primitive type values and arraylist store primitive type
44 / 152
1. C can run most of the code of C, but C can't run C code.
2. C supports procedural programming paradigm whereas C supports both procedural and object oriented programming paradigm.
3. C is a function driven and C is an object driven language.
4. C doesn't allow function definitions within structures whereas in C function definition can be within structures.
5. C doesn't support reference variables but C does support.
45 / 152
Multiple inheritence is not supported in Java because of ambuiguity that it causes.
46 / 152
Object cloning, clone() is the method available in Java for object duplication. In java, assignment operator only copies the reference and not the object. clone() is used for this.
47 / 152
An exception is a problem that arisesduring excecution. Checked exceptions are the exceptions that gets checked at the compile time. Unchecked exceptions are not checked at compile time, in Java all exceptions are unchecked exceptions.
48 / 152
In C , function declaration is means telling the compiler that a function occurs but there's no definition given to it. When in the program, the function with definition is given, it's known as function definition.
For eg.: void display();//function declaration
void display){ cout<<"Function Definition";}//Function Definition
49 / 152
By using a friend function.
A friend function has access to all private and protected members of the class for which it is a friend.
50 / 152
1. C supports pointers, Java doesn't.
2. Multiple inheritence is supported in C but not in Java.
3. Java has built-in support for threads whereas C doesn't have built-in support for threads.
4. No destructors in Java but C has them.
5. C supports both method and operator overloading, Java only supports method overloading.