About 713,000 results
Open links in new tab
  1. Stack search () Method in Java - GeeksforGeeks

    Aug 13, 2019 · The java.util.Stack.search(Object element) method in Java is used to search for an element in the stack and get its distance from the top. This method starts the count of the …

  2. Java Stack search() Method - Java Guides

    The search(Object o) method in Java, part of the java.util.Stack class, is used to search for an object in the stack and return its 1-based position from the top of the stack. This method is …

  3. Java Stack Search Method - Online Tutorials Library

    Java Stack Search Method - Learn how to use the search method in Java's Stack class to find elements efficiently. Explore examples and best practices.

  4. Stack (Java Platform SE 8 ) - Oracle

    The usual push and pop operations are provided, as well as a method to peek at the top item on the stack, a method to test for whether the stack is empty, and a method to search the stack …

  5. java - Make an int search(Object o) method for a stack that …

    Oct 10, 2020 · This means that your signature public int search(Object o) matches the signature of java.util.Stack#search (apart from synchronised). To implement the search method using …

  6. Java Stack search() Method with Example - Includehelp.com

    search () method is available in java.util package. search () method is used to search the given object (ob) onto the stack and it returns the position of the given object when it exists.

  7. Java Stack search() Method - AlphaCodingSkills

    The java.util.Stack.search() method returns the position of the specified element in the stack. The position of top element is considered 1 and the method returns the distance from the top of the …

  8. Stack Class in Java - GeeksforGeeks

    Apr 15, 2025 · The Stack class offers many methods for working with stack, such as peek(), this method is used to retrieve the top element without removing it, search(), this method search …

  9. Java Stack search() example - Java Guides

    The search() method of the Java Stack class searches for an element in the stack and determines how far the element is from the top of the stack. Syntax: stack.search(Object o);

  10. Write a Java program to search an item in a Stack collection

    The code demonstrates how to search for an item in a stack in Java using the search method of the Stack class. Let's go through the code step by step: The code begins by importing the …

  11. Some results have been removed
Refresh