3:22 am - Friday April 19, 2019

LinkedList Example Program for add(E e)

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: To appends the specified element to the end of this list.
 */
import java.io.IOException;
import java.util.*;

public class LinkedlistAddExample {
	public static void main(String args[])
{
boolean a;
int b=10;
LinkedList l=new LinkedList();
a=l.add(b);//add the element 10 in the list l and
// return true if the element successfully added to the list.
System.out.println(a);
System.out.println(b,?is successfully added to the list?);
}
}


Output
True
10 is successfully added to the list

Filed in: Z-A All Java Codes

Comments are closed.