Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What type of statement is 'int number = 5;'?
Think of the purpose it serves.
What does the expression statement 'x = x + 1;' do?
Consider what happens to the value of x.
What type of statement is used to assign a variable?
Think of how you start a variable.
True or False: A variable with local scope can be accessed anywhere in a class.
Consider where the variable is declared.
Create a class with at least one instance variable, one class variable, and demonstrate their usage in an example method.
Remember instance variables belong to objects while class variables belong to the class.
Write a method that uses control flow statements to compare two numbers and print which is larger.
Think of using 'if', 'else if', and 'else'.
6 more questions in this section. Enroll free to practise them all.
Enroll free