8:07 am - Monday July 23, 2018

Tag Archives: (Object o)

LinkedList Example Program for lastIndexOf(Object o)

/** Author :candidjava.com Description: Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element. */ import java.io.IOException; import java.util.*; public class...

Vector Example Program for indexOf(Object o)

/** @AUTHOR:Candid java.com @DESCRIPTION:Coding for get the index value of a vector */ import java.util.Vector; public class Index { public static void main(String[] args) { Vector v = new Vector(); v.add("1"); v.add("2"); v.add("3"); v.add("4"); v.add("5"); v.add("1"); v.add("2"); System.out.println(v.indexOf("1",...

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 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 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 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...

Stack Example Program for remove(Object o)

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of remove(Object o).It is used to check whether first occurence of given element is removed from stack or not */ import java.io.*; import java.util.*; ...

Stack 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...

Stack Example Program for contains(Object o)

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