1.

(a) Write the value that will be assigned to variable x after executing the following statement:x = 20 - 5 + 3 * 20/5; (b) Consider the statement:choice = 'Y';What is the datatype of variable choice? Write a Java statement to declare the variable 'choice'.

Answer»

(a) x = 3.

(b) choice is variable of char type(character type).

Declaration: char choice;



Discussion

No Comment Found

Related InterviewSolutions