Answer:
Each object of this class has its own copy of GREETING
Explanation:
option c: Each object of this class has it’s own copy of GREETING
This is the only false statement. When a variable is preceded by the Static key word only one copy of that variable is created, no matter the amount of object created from the instance of that class.
option a: Each object of this class can access GREETING, this is true.
option b: The value of GREETING can’t be changed in any methods, this is true because GREETING is preceded by the keyword final.
option d: GREETING.length() = 2, this is true because the method length() is use to get the length of the string "Hi" which is 2.
option e: GREETING.toUpperCase() = "HI", this is also true because the method toUpperCase() convert all the character of "Hi" to uppercase.
Note: All these are peculiar to java programming language.
Answer:
Boolean Values
Explanation:
Boolean Values are used as return values for functions to check whether something is true or false.
Hexadecimal numbers it is technique of representing numbers whose base value is 16.
The common use of Hexadecimal numbers are:
- To define memory locations .
- To define colors in web Pages .
- To represent error message.
- To represent MAC address
In python 3.8:
if user_tickets < 5:
num_tickets = 1
else:
num_tickets = user_tickets
For this code to work properly, you'll have to first declare user_tickets before the if-else statements.