25 solutions available
Question 1Why does Java use the Unicode character set?
Question 2What are escape sequences in Java? Give three examples.
Question 3What is the result of evaluating the following expression?(3 + 6 * 7) / 3 + 2
Question 4What is a token in Java? Name the tokens available in Java.
Question 5Why can a keyword not be used as a variable name?
Question 6Which of the following are Java keywords?area, input, class, public, int, x, y, radius, long, Hello java
Question 7What are identifiers in Java? List three identifier formation rules.
Question 8Explain the following statement — "In Java, total, Total, ToTaL, and TOTAL are all different identifiers."
Question 9Which of the following are invalid identifiers?i. tenii. "Hello"iii. 5678iv. Coffeev. $dollarvi. 4Variablesvii. _var
Question 10How would you print characters like \, ' and " in Java?
Question 11Distinguish between the following:i. Token and Identifier
Question 12Distinguish between "A" and 'A'.
Question 13What is wrong with the following statement? float flt = 7895.0345;
Question 14Describe primitive data types in Java.
Question 15List the size of primitive data types in Java.
Question 16Which integer and floating point data types take up the same number of bits in computer memory?
Question 17What is variable initialisation in Java? What are the default values of the following type of variables? short, int, long, float, double,...
Question 18Provide the declaration for two variables called xCoordinate and yCoordinate. Both variables are of type int and both are to be...
Question 19Write a Java assignment statement that will set the value of the variable interestAmount to the value of the variable balanceAmount...
Question 20Explain the statement, "a well-documented code is as important as the correctly working code".
Question 21How can you write single line comments in Java?
Question 22Write a Java constant declaration that gives the name TAX_RATE to the value 15%.
Question 23If you want to change the precedence of operations in an expression, which symbols do you use?
Question 24What are symbolic constants? How are they useful in writing programs?
Question 25What is the output produced by the following lines of program code?char x, y; x = 'y'; System.out.println(x); y = 'z';...