8:16 am - Tuesday November 21, 2017

Tag Archives: in

Stack Example Program for equals(Object o)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of equals(Object o) */ import java.io.*; import java.util.*; public class StackEquals { public static void main(String arg[])throws Exception { Stack...

Stack Example Program for elementAt(int index)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of elementAt() . */ import java.io.*; import java.util.*; public class StackElementAt { public static void main(String arg[])throws Exception { Stack...

Stack Example Program for search(Object o)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of search () . */ import java.io.*; import java.util.*; public class Search { public static void main(String args[]) { Stack s=new Stack(); s.push(1); s.push(2); s.push(3); s.push(4); System.out.println(s); int...

Stack Example Program for push(E item)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of Push() . */ import java.io.*; import java.util.*; public class Push { public static void main(String args[]) { Stack s=new Stack(); s.push(1);...

Stack Example Program for pop()

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of pop () . */ import java.io.*; import java.util.*; public class Pop { public static void main(String args[]) { Stack s=new Stack(); s.push(1); s.push(2); s.push(3); s.push(4); System.out.println(s); s.pop();...

Stack Example Program for lastIndexOf(Object o,int index)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of indexOf(Object o,int index) */ import java.io.*; import java.util.*; public class StackIndexOf { public static void main(String arg[])throws...

ArrayList Example program for subList(int fromIndex, int toIndex)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of subList(int fromIndex, int toIndex). It is used to get an element in specified from and toindex of arrayList */ import java.io.*; import java.util.*; public...

ArrayList Example program for listIterator(int index)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of listIterator(int index) . It is used to return next and previous element of the list in proper sequence from given index position */ import java.io.*; import...

ArrayList Example program for listIterator()

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of listIterator(). It is used to return next and previous element of the list in proper sequence */ import java.io.*; import java.util.*; public...

Double Example Program for floatValue()

/** @AUTHOR: candid java.com @DESCRIPTION: coding for convert into double value */ public class FloatValue { public static void main(String[] args) { Double d = new Double(123.452348493798);//Double object is created ...

ArrayList Example Program for iterator()

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of iterator() . It is used to return next element of the list in proper sequence */ import java.io.*; import java.util.*; public class ArrayListIterator { public...

ArrayList Example Program for add(E e)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of boolean add(E e).It is used to check whether given element append in end of the List or not */ import java.io.*; import java.util.*; public ...

ArrayList Example Program for add(int index, E element)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of void add(E e).It is used to add an element in specified index of arrayList */ import java.io.*; import java.util.*; public class ArrayListAppends { public...

ArrayList Example Program for clear()

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of void clear().It is used to remove all elements in list */ import java.io.*; import java.util.*; public class ArrayListClear { public static...

ArrayList Example Program for indexOf(Object o)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of int indexOf(Object o).It is used get index value for specfied element */ import java.io.*; import java.util.*; public class ArrayListIndexOf { public...

ArrayList Example Program for lastIndexOf(Object o)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of lastIndexOf(Object o).It is used to get index value for specfied element occurring at last */ import java.io.*; import java.util.*; public class...

ArrayList Example Program for isEmpty()

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of boolean isEmpty().It is used to check whether list is empty or not */ import java.io.*; import java.util.*; public class ArrayListIsEmpty { public...

ArrayList Example Program for set(int index, E element)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of set(int index, E element). This function used to replace specified element with given index position in the list */ import java.io.*; import java.util.*; public...

ArrayList Example Program for size()

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of int size(). This function used to to return number of element in the list */ import java.io.*; import java.util.*; public class ArrayListSize { public...

ArrayList Example Program for toArray()

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of toArray().It is used to return arrayList into array */ import java.io.*; import java.lang.*; import java.util.*; public class ArrayListToArray { public...