Question
Q 1 - Which of the following is true about super class? A - Variables, methods and constructors which are declared private can be accessed
Q 1 - Which of the following is true about super class?
A - Variables, methods and constructors which are declared private can be accessed only by the members of the super class.
B - Variables, methods and constructors which are declared protected can be accessed by any subclass of the super class.
C - Variables, methods and constructors which are declared public in the superclass can be accessed by any class.
D - All of the above.
Answer:
Q 2 - What is function overloading?
A - Methods with same name but different parameters.
B - Methods with same name but different return types.
C - Methods with same name, same parameter types but different parameter names.
D - None of the above.
Answer:
Q3 if s =text, what is the value returned by s.length ()?
A False
B True
C 4
D 5
Answer:
Q4 A Compound statement is:
A collection of one or more statements enclosed in braces.
A Statement involving if and else
A way of declaring variables
A way of setting the value of a variable
Answer:
Q5 What is the value stored in result after executing the following line in a program?
result = 9/3 * 5;
10
15
9
Wrong
Answer:
Q6 - Who invented Java?
Netscape
Microsoft
Sun
None of the above
Answer:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started