Question: Extra Credit Assignment 2 Software development What is the value stored in x in following lines of code? int x, y, z; x = 0;

Extra Credit Assignment 2

Software development

What is the value stored in x in following lines of code? int x, y, z; x = 0; y = 1; x = y = z = 8; a) 0 b) 1 c) 9 d) 8

ANS:______________________

3. Which of the following is a method having same name as that of its class? a) finalize b) delete c) class d) constructor

ANS:___________________________

Which of these have highest precedence? a) () b) ++ c) * d) >>

ANS:________________________________

Which of these keywords can be used to prevent Method overriding? a) static b) constant c) protected d) final

ANS:__________________________________

Which of these is correct way of calling a constructor having no parameters, of superclass A by subclass B? a) super(void); b) superclass.(); c) super.A(); d) super();

ANS:___________________________________

Which of these class is superclass of every class in Java? a) String class b) Object class c) Abstract class d) ArrayList class

ANS:______________________________

Which of these keywords can be used to prevent inheritance of a class? a) super b) constant c) Class d) final

ANS:___________________________

Which of these class relies upon its subclasses for complete implementation of its methods? a) Object class b) abstract class c) ArrayList class d) None of the mentioned

4. Which of the following statements are incorrect? a) static methods can call other static methods only. b) static methods must only access static data. c) static methods can not refer to this or super in any way. d) when object of class is declared, each object contains its own copy of static variables.

ANS:________________

Which of these keywords is used to prevent content of a variable from being modified? a) final b) last c) constant d) static

ANS:_____________________

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!