[go: up one dir, main page]

0% found this document useful (0 votes)
24 views9 pages

Computer Imp

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

Computer Imp

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

MCQs for Practice Paper 2024-25

(1) Which of the following labels appears in “Create a new document or template” dialogue box?

(A) Create in (B) Create as (C) In (D) Create

Ans. : Create in

(2) Which option is to be selected to arrange any toolbar by right clicking on it?

(A) Customize Toolbar(B) Manual (C) User (D) Arrange

Ans. : Customize Toolbar

(3) Which dialogue box is there to select form background color?

(A) Block Background Color (B) Background Color (C) Block Color (D) Bg Color

Ans. : Block Background Color

(4) Which is the available check box that gives initial value in “Selection List Properties” Dialogue

Box?

(A) Initial Value (B) Start Value (C) Initially Selected (D) None of these

Ans. : Initially Selected

(5) Which of the following tags is used to create row of a table in HTML?

(A) TR (B) TT (C) TH (D) TD

Ans. : TR

(6) In which kind of Field type does Initially Selected Check Box appear?

(A) Radio Button (B) Selection list (C) Check Box (D) A and b both

Ans. : A and b both

(7) Show the toolbar in which an option Heading 1 appears to give title of a form.

(A) Format Toolbar2 (B) Format Toolbar (C) Composite Toolbar (D) Edit mode

Ans. : Format Toolbar

(8) Which of the following stands for “WYSIWYG”?

(A) When You See Is When You Get (B) What You See Is When You Get

(C) What You See Is What You Get (D) When You See Is What You Get

Ans. : What You See Is What You Get

(9) Which of the following values are used by method attribute?

(A) GET and POST (B) GET and SET (C) GET and PUT (D) SET and POST

Ans. : GET and POST

(10) Which of the following term provides facility of sending information in form of blocks using

HTTP transaction ?

(A) get (B) action (C) post (D) Any of these


Ans. : (C) post

(11) Which of the following keeps the data safe from unintended actions and inadvertent access by

outside objects?

(A) Encapsulation (B) Abstraction (C) Polymorphism (D) Aggregation

Ans. : Encapsulation

(12) What does polymorphism mean?

(A) Many forms (B) different forms (C) a or b (D) None of these

Ans. : a or b

(13) Which of the following enables to represent data in which the implementation details are

hidden?

(A) Encapsulation (B) Abstraction (C) Messaging (D) Polymorphism

Ans. : Abstraction

(14) Which of the following is not a new concept for programming?

(A) Data-Abstraction (B) Encapsulation (C) Polymorphism (D) Messaging

Ans. : Data-Abstraction

(15) Which type of functions can be defined more than one time with same name in object oriented

programming?

(A) Methods differs in signatures. (B) Methods same in signatures.

(C) a and b both (D) None of these

Ans. : Methods differs in signatures.

(16) What type of encapsulation is possible by wrapping data and methods into a class?

(A) public (B) protected (C) private (D) multi

Ans. : private

(17) In which of the following programming are data and functions separate entities?

(A) Structured (B) Object-oriented (C) Animation (D) Web based

Ans. : Structured

(18) Which type of visibility can be there in syntax of UML notation?

(A) Private (B) Protected (C) Public 0r Package (D) All of these

Ans. : All of these

(19) What is called a new class in object-oriented terminology?

(A) Subclass (B) Child class (C) Derived class (D) All of these

Ans. : All of these

(20) What is called the capability of using same names to mean different things in different context in general?

(A) Overloading (B) Aggregation (C) Composition (D) Encapsulation


Ans. : Overloading

(21) Which of the following methods is invoked when a new object is created?

(A) constructor (B) main 0 (C) getter 0 (D) setter 0

Ans. : constructor

(22) Which is the default visibility to protect method or variable?

(A) Package (B) Private (C) Protected (D) Public

Ans. : Package

(23) Which constructor is no more available in presence of user defined constructors in a class?

(A) Default (B) Decided (C) Basic (D) Standard

Ans. : Default

(24) Which of the following initializes the attributes of newly created object using default values

based on their data types?

(A) Default constructor (B) Varies constructor (C) Constant constructor (D) None of these

Ans. : Default constructor

(25) Which is the first step to create an object?

(A) Declaration (B) Instantiation (C) Function definition(D) Initialization

Ans. : Declaration

(26) In which class is the static method ‘sqrt’ shown (stored)?

(A) Math (B) Java (C) JM (D) Java Math

Ans. : Math

(27) Which type of class is child class known as?

(A) sub (B) Extended (C) a and b both (D) Parent

Ans. : a and b both

(28) ‘protected’ members are available as the following type of members in the inherited subclass.

(A) public (B) private (C) package (D) None of these

Ans. : private

(29) Which of the following is the keyword used to refer a superclass constructor in subclass

constructor?

(A) extends (B) super (C) name of the superclass (D) new

Ans. : super

(30) What is heap ?

(A) Special word of Java (B) Special part of memory (C) Special subsidiary part of memory

(D) None of these

Ans. :(C) Special subsidiary part of memory


(31) Java is small, simple and portable across platforms and operating systems, at the
……………… level.
(A) source program
(B) Binary
(C) hexa numbers
(D) (A) and (B) both
Answer:
(D) (A) and (B) both

(32) What is basic class ?


(A) A part of Java Development Kit (JDK)
(B) Information of class
(C) (A) and (B) both
(D) No class is there
Answer:
(A) A part of Java Development Kit (JDK)

(33) All classes of Java library are written in …………….. .


(A) Java
(B) Linux
(C) Unix
(D) C language
Answer:
(A) Java

(34) At …………….. level, platform-independece is possible due to bytecode interpreter.


(A) Source Program
(B) Binary Level
(C) Flexa level
(D) None of these
Answer:
(B) Binary Level

(35) The machine language of JVM is ……………. .


(A) Java Bite Code
(B) Java Machine Code
(C) Java Binary code
(D) Java Hexa code
Answer:
(A) Java Bite Code

(36) Using tools in Java bytecode is converted to …………… .


(A) Gative code
(B) Panic code
(C) Native code
(D) Machine code
Answer:
(C) Native code

(37) Which method must be there in Java program ?


(A) main
(B) public
(C) type
(D) All of these
Answer:
(A) main

(38) After errorless compilation of Java program …………….. file is automatically created.
(A) .class
(B) .java
(C) .cmp
(D) .jacm
Answer:
(A) .class

(39) ……………….. compiler makes the bytecode file in Java language.


(A) jdk
(B) javac
(C) ecj
(D) None of these
Answer:
(B) javac

(40) Syntax rules use …………… as basic vocabulary.


(A) variable, expressions
(B) statements, branches
(C) loop and method
(D) All of these
Answer:
(D) All of these

(41) Basic variable can store only one value. Such variable is known as …………….. .
(A) constant variable
(B) scalar variable
(C) modular variable
(D) (A) or (B)
Answer:
(D) (A) or (B)

(42) What is Index position in array ?


(A) Each element of an array
(B) Sequence of an array
(C) Value of each array element
(D) None of these
Answer:
(A) Each element of an array

(43) ……………. syntax is true to declare 1-D array.


(A) <data type> <array name> [ ];
(B) <data type> [ ] <array name>;
(C) (A) and (B) both
(D) <data typo [ ] {array name};
Answer:
(C) (A) and (B) both

(44) int marks [ ] = new int [5] , how many bytes will be required by marks array ?
(A) 15
(B) 20
(C) 18
(D) 5
Answer:
(B) 20

(45) What does 2 suggest in marks [2] ?


(A) Index of element
(B) Value of element
(C) Total elements
(D) All of these
Answer:
(A) Index of element

(46) If we initialize the values of variables directly then …………….. operator is not needed.
(A) new
(B) create
(C) array name
(D) all of these
Answer:
(A) new
(47) Which elements are sorted by giving java.util.Arrays.sort (list 1, 5) ?
(A) list [1] to list [5]
(B) list [1] to list [5 – 1]
(C) list [0] to list [5 – 1]
(D) None of these
Answer:
(B) list [1] to list [5 – 1]

(48) Pair of ……………… brackets are used to declare 2-D array in java.
(A) ( ) ( )
(B) [ ] [ ]
(C) { } { }
(D) < > < >
Answer:
(B) [ ] [ ]

(49) What is the use of length property in 2- array ? 59)


(A) Returns the number of rows.
(B) Returns the number of columns.
(C) counts the length of a string
(D) None of these
Answer:
(A) Returns the number of rows.

(50) Which constructor will create a string object using variable’s initial value ?
(A) String (char ary[ ])
(B) String()
(C) String (String String)
(D) String (String literal)
Answer:
(A) String (char ary[ ])

(51) What is true about the exception ?


(A) Exception occurs infrequently
(B) Exception handling allows a program to continue as if no problem is there
(C) It notifies the user of the problem before terminating in an uncontrolled manner
(D) All of these
Answer:
(D) All of these

(52) If there is no semi colon at the end of the statement then what will happen ?
(A) It will show error while compiling a program
(B) .class is not created
(C) (A) and (B) both
(D) Nothing happens
Answer:
(C) (A) and (B) both

(53) What is available for each type of exception in Java ?


(A) Public class
(B) Related exception class
(C) Private class
(D) All of these
Answer:
(B) Related exception class

(54) What is the meaning of exception handling ?


(A) It is an object oriented technique for managing errors
(B) Not to consider the exception situation
(C) To manage the exception situation
(D) All of these
Answer:
(A) It is an object oriented technique for managing errors

(55) Finally block is always executed ……………. .


(A) In the beginning of the program
(B) In the end of the program
(C) Before ending the program
(D) In any part of the program
Answer:
(C) Before ending the program

(56) The possibilities of arising exceptions are written in …………… .


(A) catch
(B) try
(C) finally
(C) throw
Answer:
(B) try

(57) ……………. is incorrect about finally block.


(A) If it is necessary to close the file after executing the program
(B) It is always at the end of the program
(C) [ ] bracket is used in creating finally block
(D) If any resources are to be released at that time it is widely used
Answer:
(C) [ ] bracket is used in creating finally block

(58) It is usually understood that a compiled program is error free and will always
…………….. successfully.
(A) complete
(B) execute
(C) perform
(D) accomplish
Answer:
(B) execute

(59) The last …………… can handle any type of exception.


(A) try block
(B) catch block
(C) finally block
(D) none of these
Answer:
(B) catch block

(60) What will be the output of the program ? public class Test
{
public static void main(String[ ] args)
try
{

(A) Finally
(B) Compilation fails
(C) The code runs with no output
(D) An exception is thrown at runtime
Answer:
(A) Finally

You might also like