3:38 am - Friday May 26, 2017

Vector Example Program for toString()

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

@author:candidjava.com
@description:Vector Example Program for toString()
*/

import java.util.Vector;
public class ToString
{
public static void main(String args[])
{
Vector<Integer>vc=new Vector<Integer>();
vc.add(11);
vc.add(22);
vc.add(33);
vc.add(44);
System.out.println(vc);
//convert into string
vc.toString();
System.out.println("numbers:");
for(Integer a  : vc)
{
System.out.println("numbers:"+a);
}
}
}


output
numbers:
numbers:11
numbers:22
numbers:33
numbers:44

Filed in: Z-A All Java Codes

Comments are closed.