Testing strings and numbers
Testing for string equality
Notice that we use the method equals - you cannot use the == operator here.
Print the name of the country if the region is "North America"
Testing for number equality
When testing numbers you should use the == operator.
Print the name of the countries with a population of exactly 2000000
Testing for pieces of a string at either end
You can check to see if one string starts with a particular value (using startsWith) ends with a value (using endsWith).
Print only those countries where the name ends with
Testing for pieces of a string in the middle
You can check to see if one string contains another using the contains method.
Print only those countries where the name includes
Testing for inequality
Print only those countries where pop is less than 20000