Suggest a suitable Java data type that can be used to store each of the followin
ID: 3857484 • Letter: S
Question
Explanation / Answer
1)Suggest suitable data types
i)Name of a person==String type
ii)Gender of a Person ==enum
example public enum gender={M,F}
iii)An indicator to specify a transaction is successful=boolean
iv)Cost of an Item=double
v)Number of students in a class=int
2)True or False
i)The first statement is false because we will add it to execute some think if non of the case is matched
it is not compalsary to add it is optional
ii)second statement is false because we use break statement in switch to stop the rest of the case statement follwed after the match case is found as defalut is the last case of switch so break is not necessary for default
iii)last statement is true we cannot test for a range of values
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.