Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What does the operator != do?
Think about the opposite of equality.
What value does x > y return when x is 5 and y is 3?
Is 5 greater than 3?
What does the == operator do?
Think of it as asking if the two values are the same.
True or False: The expression x <= y checks if x is greater than y.
Consider what the symbol `<=` means.
Write a program that compares two user inputted numbers and prints the largest using relational expressions.
Think about how you'd compare two values and what you want to print.
Define a Java method that takes three integers as parameters and returns the smallest number using relational expressions.
Consider how you could start with one variable and compare it with the others.
6 more questions in this section. Enroll free to practise them all.
Enroll free