ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 


 

Company >> Span Infotech >> Span Infotech Questions
 
 Wipro interview questions  Wipro Interview Questions (2)
 
Back to Questions Page
Question   what is output parameters in qtp?explain? 2) Rank Answer Posted By  
 Interview Question Submitted By :: Sudheer
I also faced this Question!!   ALL Interview .com
Answer
standered output values,text outputvalues,textarea,xml
o/p,database o/p
 
0 Bhavani
 
 
Answer
Generally Actions do not accept or return any values, to make it true there is a beautiful feature called Input/output parameter. Through Input parameter we can send "n" number of values as input to an Action and through output parameter we can return "n" number of values as output of an Action

Where n=1 2 3 4......
 
0 Venkatesh Naidu Rangisetti
 
 
Question   what is the difference between ArrayList and Vector Rank Answer Posted By  
 Interview Question Submitted By :: Guest
I also faced this Question!!   ALL Interview .com
Answer
1. Arraylist is not synchronized while vector is.
2. Arraylist has no default size while vector has a default 
size of 10.
 
1 Mohammed Salim
 
 
 
Answer
Arraylist is not synchronized where as Vector is
synchronized.   
No default size for Arraylist where as Vector is having a
default size of 10.
 
0 Harmeet
 
 
Answer
i would like to add a new point to above answers.
we can specify the increment size with the vector and with 
array list we cannot
 
0 Narasimha
 
 
Answer
ArrayList is non synchronized.Vector is
synchronized.ArrayList is very fast because non
synchronized.we can specify the increment size with the
vector and with arrayList we cannot
 
0 Dara
 
 
Answer
Hi...
ArrayList is not synchronized(not Thread-safe)but Vector is 
Synchronized(Thread-safe)
ArrayList gives u better performance than Vector
 
0 Devarathnam
 
 
Answer
I am adding some more points to the above answers.

Array list and Vector have one in common. They both 
implement Random Access.
It is possible to provide synchronization using Array List 
by using the utility methods in Collection.
 
0 Ganesh Nagalingam
 
 
Answer
for addition of 3rd answer incresing capacity in vector 
using with ensureCapacity(int x) method
 
0 Surya
 
 
Answer
ArrayList and vector both are dynamically growing arrays.
ArrayList is not thread safe where as vector is thread safe.
vector is legacy class and ArrayList is newly added.
by default ArrayList capacity is 0 where as Vector intial 
capacity is 10.
vector is growing by its size doubled.
ArrayList is increse by its size half(50%)
 
0 M.sridhar
 
 
Answer
ArrayList is having only those method defined within its
collection class but in case of vector it is having its own
method which is not a part of its collection class.
 
0 Bhushan Singh
 
 
Answer
import java.util.*;
public class VectorDemo{
  public static void main(String[] args){
    Vector<Object> vector = new Vector<Object>();
    int primitiveType = 10;
    Integer wrapperType = new Integer(20);
    String str = "tapan joshi";
    vector.add(primitiveType);
    vector.add(wrapperType);
    vector.add(str);
    vector.add(2, new Integer(30));
    System.out.println("the elements of vector: " + vector);
    System.out.println("The size of vector are: " + 
vector.size());
    System.out.println("The elements at position 2 is: " + 
vector.elementAt(2));
    System.out.println("The first element of vector is: " + 
vector.firstElement());
    System.out.println("The last element of vector is: " + 
vector.lastElement());
    vector.removeElementAt(2);
    Enumeration e=vector.elements();
    System.out.println("The elements of vector: " + vector);
    while(e.hasMoreElements()){
      System.out.println("The elements are: " + 
e.nextElement());
    }  
  }
}
 
0 Tamilvendan
 
 
Answer
Arraylist also has the initial capacity as 10.
Please check the following code in ArrayList class:

public ArrayList() {
	this(10);
    }
 
0 Thoi
 
 
Answer
1.	Vector is synchronized while ArrayList is not.
2.	Vector has default size is 10 while ArrayList has 10(Look
Java Class).
3.	We can specify increment size with Vector.
4.	If we use ensureCapacity(int minCapacity) to set the
default increment size then remember following things:
a.	Vector v = new Vector();
b.	V.capacity(); === output will be 10
c.	If you try to set v.ensureCapacity(5),then
d.	V.capacity(); ===10 
e.	If you try to set v.ensureCapacity( >20), then
f.	V.capacity();===20 and 
g.	If you try to set v.ensureCapacity(21), then
h.	V.capacity();===21, It clears that if set capacity over
20 then it will be set otherwise no.
 
0 Vikas
 
 
Answer
In the above examples, need to change one thing. i.e   	
e.	If you try to set v.ensureCapacity( >10), then
f.	V.capacity();===20 

if we put value between 11 to 20, the capacity will be 20,
after that it will increase if greater than 20.
 
0 Vishu
 
 
Answer
What is the intial buffer size of arraylist?

    public Vector() {
	this(10);
    }
if u check v.capacity(),it'l display the buffer size of vector.
like i need a program to find intial buffer size of arraylist.
plz see java class for arraylist.
    public ArrayList() {
	this(10);
    }
if anyone knows about this one.plz post the comment.
 
0 Subha
 
 
Answer
yes ArrayList is not syncronized on multiple threads and 
not give correct result but Vector is syncronized 0n 
multiple threads and it give correct result
 
0 Mallikarjuna
 
 
Answer
I would like to answer this question as point...which would be easier to remember
       
1.Vector is synchronized whereas an arraylist is not synchronized
2.Vector is an object whereas an arraylist is a part of the collection framework
3.Vector has a default size of 10 whereas an arraylist has no default size
4.Vector requires an iterator to display its contents whereas an arraylist does not require any iterator
5.Vector defines an increment size whereas an arraylist does not define any increment size
 
0 Payel
 
 
Answer
ArrayList contains all methods are non-synchronized methods.
ArrayList by default not threadsafe.
ArrayList allows duplicate objects.
ArrayList default size is 16.if you want to increase size 
use this formula:-- defaultsize * 3/2 + 1.
we can make araylist as synchronised:--

List l=Collections.SynchronizedList(new arrayList());

Arraylist is best choice for retrival operation and worest 
choice for insert operation.


Vector:--

Vector is same like arraylist, but we have only one 
difference is vector contains all synchronized methods. 

Vector is best choice for retrival operation and worest 
choice for insert operation.
 
0 Janardhan
 
 
Answer
VECTOR:
i)Vector is a legacy class and represents array data structure.
ii)Vector uses indexing notation to store values.
iii)Vector can grow and shrink dynamically.
iv)Vector is synchronized; multiple threads cannot access
the vector object concurrently. Only one thread can access
the Vector object at a specific time.
v)Duplicate values are allowed.
vi)Before to java 2 there was an interface called
Enumeration to visit the elements of Vector. But now we have
two interfaces to visit the elements of Vector. They are
Iterator and ListIterator.
vii)	Vector elements can be accessed randomly because it
implements RandomAccess marker interface
viii)	Values will be stored in the same order as inserted.
ix)	 The elements in Vector can be accessed by Enumeration,
Iterator and ListIterator.


ArrayList:

i)ArrayList is a new class used to store multiple objects.
ii)ArrayList uses array data structure internally to store
the elements.
iiiArrayList uses indexing notation to store
values(sequentially).
iv)ArrayList can grow and shrink dynamically.
v)Duplicate values are allowed.
vi)ArrayList is not synchronized.
vii)ArrayList elements can be accessed randomly because it
implements RandomAccess marker interface.
viii)Values will be stored in the same order as inserted.
ix)The elements in ArrayList can be accessed by Iterator and
ListIterator.
 
0 Rama Krishna Dwadasi
 
 
Answer
ArrayList                              Vector
1>. NOT synchronized       1>.Synchronized by Default
2>. Use only Iterator to   2>.Can use Iterator and Enumerator
    access elements           interface to access elements
3>. It increase it's size  3>.Default it double it's size
    by 50% if it run out
    off room
4>. No default size        4>.Default size is 10.
 
0 Kishore Kumar Naidu N
 
 
 
Back to Questions Page
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com