Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is a variable in programming?
Think about memory and storage.
How do you declare an integer variable named 'number'?
Remember the syntax 'data_type variable_name;'.
What must you do before using a variable in Java?
Remember: You can't use it until it's declared!
Is it true that instance variables are the same for all objects of a class?
Think about how objects in Java work.
Write a program that demonstrates both local and instance variables. Explain what happens if you try to access a local variable outside its method.
Pay attention to variable scopes.
Create a class with a static variable and demonstrate how it can be accessed from different instances. What happens when it is modified?
Remember that static variables belong to the class.
5 more questions in this section. Enroll free to practise them all.
Enroll free