Java

TOPIC 06 – VARIABLES
AP EXTRA

 

AP LESSON WORK

 

 

QUESTION 1


You have been hired by a company to create a program for them. The program will need to store millions of 4-digit integers (security codes) which means millions of variables.

 

a) What type of variable do you think would be best to store these 4-digit integers? Explain.

b) If the company informs you that they will be increasing the security code length to 8-digits, what variable type would you use? Explain.

c) How would choosing a long variable type be a disadvantage? How would it be an advantage?