VAAGDEVI DEGREE COLLEGE, NIZAMABAD

advertisement
B.Sc. II Year Internal Assessment - I, Question Bank
VAAGDEVI DEGREE COLLEGE, NIZAMABAD
COMPUTER SCIENCE
Paper – II
(OOP’s through JAVA & Data Structures)
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
Which of the of the following is not a primitive data type?
(
a) boolean
b) byte
c) string
d) double
The language is ...........
(
a) case sensitive
b) case insensitive
c) low level
d) weaklytyped
The number of bytes needed to store a number, of datatype ‘double’ is (
a) compiler dependent
b) JVM dependent
c) O.S dependent
d) 8
Which of the following is not a key word in java ?
(
a) volatile
b) pointer
c) super
d) this
Which of the following can be declared ‘final’ ?
(
a) a class
b) a method
c) a variable
d) all of the above
Java does not supports..............
(
a) pointers
b) data types
c) loops
d) arrays
Java is programming language created by ...................
(
a) Dennis Ritchie
b) Tim Berners Lee
c) James Ghostling
d) E.F. Codd
J.V.M stands for...........
(
a) Java Virtual Mechanism
b) Java Viewable Machine
c) Java Virtual Message
d) Java Virtual Machine
What is the size of boolian type in java?
(
a) 1 bit
b) 1 byte
c) 2 bits
d) 2 bytes
A class can contain ..................
(
a) data members
b) member methods
c) a & b
d) objects
UNICODE stands for...................
(
a) Universal Code
b) Uniform Code
c) Unit Code
d) University Code
What does OOPs stands for?
(
a) Open-Organizing Programming
b) Object-Oriented Programming
c) Object-Oriented Principles
d) Object-Oriented Procedures
An object is a ..................
(
a) real world entity
b) program c) function
d) procedure
)
)
)
)
)
)
)
)
)
)
)
)
)
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
The wrapping up of data members and member methods into a single (
)
unit is a/an ............
a) Encapsulation b) Abstraction
c) Inheritence
d) Polymorphism
In OOP, the idea of reusability is achieved by ......................
(
)
a) Classes
b) Polymorphism c) Dynamic Binding d) Inheritance
Original name of java is ....................
(
)
a) oracle
b) oak
c) c++
d) jdk
Java was developed by .....................
(
)
a) Microsoft
b) Yahoo
c) Sun Microsystems
d) Google
The first application programm written in java was ................
(
)
a) Hot Java
b) Mozilla Firefox
c) Internet Explorer
d) Google Chrome
HTML stands for .......................
(
)
a) Hypertext Modeling Language
b) High Technical Markup Language
c) Hightech Markup Language
d) Hypertext Markup Language
API stands for ...........................
(
)
a) Application Programming Interface b) Application Programming Interface
c) Advance Program Internet
d) Advance Programming Interface
Java source code is compiled into?
(
)
a) Object code
b) Unicode
c) Byte code
d) All the above
Which is not a keyword?
(
)
a) args
b) public
c) static
d) void
Which keyword is used for subclassing?
(
)
a) implements
b) include
c) import
d) extends
Default package of java?
(
)
a) java.io
b) java.thread
c) java.lang
d) java.util
The members associated with class are
(
)
a) public
b) static
c) private
d) protect
The method with same name, but different parameters lists is
(
)
a) overloading
b) overriding
c) static
d) abstraction
Objects in java are created using the ................. operator
(
)
a) ? : operator
b) = operator
c) new operator d) none of the above
for ( int i=1; i <= 5; i++)
(
)
if (i==5)
continue;
System.out.println(i);
a) 1 2 3 4 5
b) 0 1 2 3 4
c) 0 1 2 3 4 5
d) 1 2 3 4
Identify an exit - controled loop?
(
)
a) while loop
b) for loop
c) do - while loop d) nested loop
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
if (System.out.println(“hello”))
{
}
a) syntax error
b) null
c) hello
14 % 4 = ?
a) 0
b) 1
c) 2
int a=5, b=2;
float c= a/b;
System.out.println(c);
a) 2.5
b) 2.0
c) 2
int x=5;
float y=x/2.0f;
System.out.println( y );
a) Error
b) 2.0
c) 2.5
x = +4;
System.out.println( x );
a) 8
b) 4
c) 5
int x = 10; int y = 20;
System.out.println( x>y );
a) true
b) 1
c) 0
int m=5;
++m;
m++;
System.out.println ( m );
a) 5
b) 6
c) 7
int k=10;
++k;
k++;
k = 15;
a) 10
b) 11
c) 12
037 is a/an...................
a) octal
b) decimal
c) hexa decimal
In java size of ‘ int ’ data type is ........................
a) 2 bytes
b) 8 bytes
c) 4 bytes
Identify the valid expression?
a) float x = 25.23; b) float x = 22.35f; c) float x = 25;
Which is not a valid keyword in java?
a) null
b) transient
c) synchronized
(
d) run-time error
(
d) 4
(
)
)
)
d) Error
(
)
(
)
(
)
(
)
(
)
d) 2.5f
d) 6
d) false
d) 8
d) 15
(
d) real constant
(
d) 10 bytes
(
d) int x = 15i;
(
d) native
)
)
)
)
42.
43.
44.
45.
46.
47.
48.
49.
50.
The Java programming language is a ________?
(
)
a) Machine Level Language
b) High Level Language
c) Assembly Level Language
d) None of the above
Which is not a valid comment style in Java?
(
)
a) /* comment */ b) /* comment
c) /** comment */ d) // comment
What is the correct signature of the main method?
(
)
a) public static void main(String[] args)
b) static public void main(String[] args)
c) public void main(String[] args)
d) A and B Both
A collection of methods with no implementation is called an ________. (
)
a) Polymorphism b) Inheritance
c) Interface
d) Data Binding
How many type of Primitive Data Types exist in Java?
(
)
a) 5
b) 7
c) 8
d) 10
Which keyword is used to inherit class?
(
)
a) inherit
b) extends
c) inheritance
d) extend
Overloaded methods are differentiated by
(
)
a) Number of arguments
b) Data type of arguments
c) Number and the Data type of the arguments
d) None of the above
Choose best option that describes Constructor.
(
)
a) Have no return type
b) Use name of the class and have no return type
c) Use name of the class
d) None of the above
A constructor that is automatically generated in the absence of explicit (
)
constructors called?
a) Default Constructor
b) Nullary Constructor
c) Empty Constructor
d) All the above
---oo 0 oo---
Download