Professional Documents
Culture Documents
Lecturer Exercise 11
Lecturer Exercise 11
name. They can be a class name, variable name, method name, package name, constant name and
others
(a) State whether the following identifier is valid or invalid and give the reason.
[14 marks]
2. Identify the suitable primitive data type based on statement intable below. [8 marks]
double
(i) Calculate price after discount.
iii) n=8;
System.out.print ( n * n ) ;
System.out.print ( n + 5 ) ; 1 13
iv) (9 > 10) || ( 7 <= 3) && (!( 5 == 5) && (99 > 10)) ;
false