PRACTICE JAVA
Which of the following are true about flowlayout?
a. The default layout manager for an Applet is FlowLayout b. The default layout manager for an application is FlowLayout c. A layout manager must be assigned to an Applet before the setSize method is
Which statement is true for object code?
i) It is used as its fundamental building block ii) Similar objects are classified using a concept of class iii) Polymorphism and abstraction are not its basic properties a. Only 1 and 2 b. Only
The expression (int)(76.0252175 * 100) / 100 evaluates to
a. 76 b. 76.0252175 c. 76.03 d. 76.02 Answer: a. 76 Explanation: Firstly, 76.0252175 is multiplied by 100 we get the result as 7602.52175. Now the result is divided by 100 we get 76.0252175, before
A java character is stored in ________.
a. 1 byte b. 2 bytes c. 3 bytes d. 4 bytes Answer: b. 2 bytes Explanation: Java supports unicode. Character in Java takes 2 bytes of memory or 16 bits of memory.
Which of the following is the correct expression of character a?
a. ‘a’ b. “a” c. a’ d. a Answer: a. ‘a’ Explanation: Whenever character literals are written, they should be enclosed inside the single quotes.
To declare a constant max_length as a member of the class, you write?
a. Final static float MAX_LENGTH = 99.98; b. Final static MAX_LENGTH = 99.98; c. Final double MAX_LENGTH = 99.98; d. Final static double MAX_LENGTH = 99.98; Answer: d. Final static double MAX_LENGTH = 99.98; Explanation:
Aniket Malik
CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS
My students are the presents from God to me
Do you want to learn
Programming?
Hey, I’m Aniket. I’m determined to make you one of the best developers in the history of Information technology.
My only question is, are you ready?