Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

_ 4 Which of the following is the default value of a local variable? A - null B-0 C - Depends upon the type of

image text in transcribed

_ 4 Which of the following is the default value of a local variable? A - null B-0 C - Depends upon the type of variable D - Not assigned 5. Which of the following is true about protected access modifier? A - Variables, methods and constructors which are declared protected can be accessed by any class. B - Variables, methods and constructors which are declared protected can be accessed by any class lying in same package. cvanables, methods and constructors which are declared protected in the superclass can be accessed only by its child class. D None of the above. Which of the following is false about String? A - String is immutable. B String can be created using new operator C - String is a primary data type D - None of the above 6. . Consider the code segment below public class AGoodClass public void oneMethod) t System.out.printin("Hello again!!) public static void main IString [I args) f AGoodclass cenew AGoodclass ce.oneMethod) What is the output from above code? A- "Hello again!! B The code does not compile because there is no constructor C The code does not compile because the oneMethod is not correct D - None of above 8. Composition represents A - HAS-A relationship. B IS-A relationship. -9. which statement below is correct about static variables A- static variables can only be accessed by static methods B - static variables can not be inherited. C - static variables can not be accessed using class prefix. D-static variables can be accessed even without creating an object of class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions