0% found this document useful (0 votes)
7 views4 pages

12 TH

Uploaded by

prkvs2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

12 TH

Uploaded by

prkvs2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1. What is the associativity of dot operator ?

(A) Left to right (B) Right to left (C) Top to bottom (D) Bottom to top
2. What is the initial value of reference variable by default ?
(A) Null (B) 1 (C) 0 (D) None
3. What are the variables defined inside method or blocks are called as?
(A) Class (B) Method (C) Instance (D) Local
4. Which variables are created when the method or block is started and destroyed
when the method or block has completed?
(A) Global (B) Local ' (C) Class (D) Instance
5. Which variables are defined within a class but outside any method ?
(A) Instance (B) Local (C) Global (D) Static
6. Which keyword is used to create class variables?
(A) Void (B) Main (C) Static (D) Public
7. Which variables are allocated memory only once per class and is shared by
all its objects ?
(A) Local (B) Class (C) Instance (D) Private
8. Which of the following is a combination of the method name, the type of
return value, a list of parameters ?
(A) Class signature (B) Object signature
(C) Method signature (D) Variable signature
9. Which of the following must have the same name as class name ?
(A) Object (B) Constructor · (C) Void (D) Instance
10. Which of the following does not have return type ?
(A) Instance (B) Constructor (C) Static variables (D) Instance
11. Which of the following is invoked implicitly only when an object is constructed
using new operator ?
(A) Constructor (B) Local variables (C) Methods (D) Class variables
12. How can we define a user-defined no-argum nt constructor ?
(A) <classname> ( ) [ ]; (B) <objectname> { } ( );
.(C) <constructomame> [ ] ( ) (D) <classn me> ( ) { };
13. From the following which type of visibility modifiers are used · to protect a
method or variables ?
(A) Public (B) Package
(C) Protected and Private (D) All of them
14. Which of the following is about controlling visibility ?
(A) Package (B) Access control (C) Class (D) Method
15. What is used to organize classes ?
(A) Package (B) Access control (C) Constructor (D) Access modifier
16. Which of the following are visibility modifiers ?
(A) Private Variables (B) Methods
(C) Access modifiers (D) Packages
17. Which kind of variables and methods are visible anywhere ?
(A) Private (B) Package (C) Public (D) Getter
18. Which is the best way to provide Data encapsulation ?
(A) Make data protected (B) Make data as package
(C) Make data private (D) Make data public
19. Which method is used if we want to allow other methods to read only the data value ? [M-16]
(A) Getter (B) Setter. (C) Both A & B (D) Package
20. Which class is referred to as subclass ?
(A) First (B) Main (C) Parent (D) Child
(A) Void (B) Main (C) Static (D) Public
5. Which variables are allocated memory only once per class and is shared by all
its objects ?
(A) Local (B) Class (C) Instance (D) Private

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy