Search:

Type: Posts; User: Norm

Search: Search took 0.23 seconds.

  1. Replies
    8
    Views
    1,566

    Re: Contain method to read array

    Define a method like this:
    public boolean checkIfContains(String operation, String[] operators) {


    Usage:
    if(checkIfContains(operation, operators))
  2. Replies
    8
    Views
    1,566

    Re: Contain method to read array

    The fastest way to see if there is a method in the string class that works this? is to read the API doc.
    There is not a method for every possible way of using a class. You will have to write your...
  3. Replies
    8
    Views
    1,566

    Re: Contain method to read array

    The operation variable is a String. You have to use the methods that the String class has, you can't make them up.
    If you write your own class then you can write your contains() method to take a...
  4. Replies
    8
    Views
    1,566

    Re: Contain method to read array

    if(operation.contains(operators))
    How is the contains() method of the class for operation defined? You should be able to define the contains method to take a String array.
    Are you writing the...
Results 1 to 4 of 4