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 is a variable?
Think about storage spaces in a program.
Name one primitive data type.
Remember the types that hold simple data.
What is the size of an int data type in Java?
Think about how many bits in common integer types.
True or False: A variable can hold only one data type during its lifetime.
Remember the rules of variable declaration.
Imagine you're storing information for a school. Create a variable for a student's name using a string and a variable for their age using an integer. Provide the declarations.
Remember to use the correct data types for names and ages.
Consider a scenario where you need to store a high-precision measurement, like the temperature of a chemical reaction. Which data type would you choose to declare this variable and why?
Reflect on types that can store decimal values.
6 more questions in this section. Enroll free to practise them all.
Enroll free