title: How to use the boolean contains(Charsequence s) method in Java?
body: <p>How do I pass my desired sequence ('admin') to contains method?</p>
  
  <pre><code>class containstest
  {
      public static void main( String [] args)
      {   
          System.out.println("Enter string");
          Scanner S = new Scanner (System.in);
          String s = S.next();
          char A = 'admin' ;
          boolean flag;
          flag = s.contains(CharSequence A);
          if (flag == true)
          {
              System.out.println("Admin mode");
          }
          else
          {
              system.out.println("customermode");
          }
  
  
      }
  }
  </code></pre>