Java Programming Mid - I, September - 2014
1.A class contains
-
Variables
-
Methods
-
Variables & Methods
-
Members
-
Answer: C
2.Expand API
-
Application port interface
-
Advanced programming input
-
Application Programming Interface
-
Applied port interface
-
Answer: C
3._______ is the collection of classes.
-
Package
-
Interface
-
Classes
-
Objects
-
Answer: A
4.Which type of inheritance is not allowed in JAVA?
-
Multi Level
-
Single
-
Multiple
-
none
-
Answer: C
5.Implicit type conversion carried out by
-
Programmer
-
Compiler
-
Type Casting
-
All
-
Answer: B
6.The default package imported into all java programs is ____________
-
java.util
-
java.awt
-
java.lang
-
java.io
-
Answer: C
7.An interface contains methods
-
Un-implemented
-
Non-abstract
-
Implemented
-
Final
-
Answer: A
8.The smallest int data type in java is __________
-
int
-
short
-
byte
-
float
-
Answer: C
9._______________ are used in java to prevent naming conflicts.
-
packages
-
interfaces
-
classes
-
all
-
Answer: A
10.The methods that implements an interface must be declare as
-
private
-
public
-
static
-
protected
-
Answer: B
11.The mechanism of deriving a new class from an old one is _________________
Answer: Inheritance
12.Static members can be accessible without the help of _____________________
Answer: Object
13.An exception is caused by _____________________
Answer: Runtime Errors
14.Define an Object ________________________
Answer: Instance of a class
15.A constructor that accepts no parameter is called as ______________
Answer: Default Constructor
16.Inheritance defines ____________________ relationship.
Answer: is-a
17.The Object class defines in __________________ package.
Answer: java.lang
18.A Constructor is also known as ___________________ function.
Answer: Special Member
19.JVM stands for __________________________
Answer: Java Virtual Machine
20.Default value of float data type is ___________________
Answer: 0.0f