How to write Not Equals in String Java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Farhana88
    New Member
    • Feb 2014
    • 1

    How to write Not Equals in String Java

    if (customers.get( num1).getId() != (id) && !movies.get(num 2).getTitle().e quals(title)){
    System.out.prin tln("Your movie or/and theatre cannot be found.");


    Is this the way to write not equal in this statement ->'!movies.get(n um2).getTitle() .equals(title)) '

    Thank You in advance! :)
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    Hi Farhana88 and welcome to bytes.com!

    Yes, that is correct. Not pretty, I know, but it should work as intended.

    Comment

    Working...