6/1/2021 vmedulife Learner Dashboard
Vignan Institute of Technology and
Science, Yadadri Bhuvanagiri
Program : Civil Engineering
Semester : E I E 3-2
Name of Student Sreelekha Davuluru
Mobile Number 9177736148
Registered Mail [Link]@[Link]
Exam Title MID-I ONLINE TEST
Total Marks 25
Student Score : 24
[Link] 1/12
6/1/2021 vmedulife Learner Dashboard
1 ] Question : What is the process of defining a method in a subclass having same name & type signature as a
method in its superclass? [Single Correct] [ 1 Mark/s]
1) Method overriding
2 ) Method hiding
3 ) Method overloading
4 ) Method binding
Answer Status: Correct
2 ] Question : which of the following method can be used to call another constructor from a constructor of same
class. [Single Correct] [ 1 Mark/s]
1 ) super
2 ) const()
3 ) super()
4) this()
Answer Status: Correct
[Link] 2/12
6/1/2021 vmedulife Learner Dashboard
3 ] Question : Which of these classes is used to write characters to a text file? [Single Correct] [ 1 Mark/s]
1) FileWriter
2 ) FileInputStream
3 ) FileReader
4 ) BufferedOutputStream
Answer Status: Correct
4 ] Question : Which of these keywords must be used to handle the exception thrown by try block in some rational
manner? [Single Correct] [ 1 Mark/s]
1 ) finally
2 ) throw
3 ) try
4) catch
Answer Status: Correct
5 ] Question : Which of the following is an incorrect statement about packages? [Single Correct] [ 1 Mark/s]
1 ) A package can contain other package within it
[Link] 3/12
6/1/2021 vmedulife Learner Dashboard
2 ) Java uses file system directories to store packages
3 ) Package defines a namespace in which classes are stored
4) A package can be renamed without renaming the directory in which the classes are stored
Answer Status: Correct
6 ] Question : Which of these classes can be used to implement the input stream that uses a character array as
the source? [Single Correct] [ 1 Mark/s]
1 ) FileReader
2) CharArrayReader
3 ) BufferedReader
4 ) FileArrayReader
Answer Status: Correct
7 ] Question : If a class inheriting an abstract class does not define all of its function then it will be known as?
[Single Correct] [ 1 Mark/s]
1 ) A simple class
2 ) Static class
3) Abstract class
[Link] 4/12
6/1/2021 vmedulife Learner Dashboard
4 ) Concrete class
Answer Status: Correct
8 ] Question : Which of these keywords must be used to monitor for exceptions? [Single Correct] [ 1 Mark/s]
1 ) finally
2 ) throw
3) try
4 ) catch
Answer Status: Correct
9 ] Question : What is the return type of Constructors? [Single Correct] [ 1 Mark/s]
1 ) float
2 ) void
3 ) int
4) must not specify any return type
Answer Status: Correct
[Link] 5/12
6/1/2021 vmedulife Learner Dashboard
10 ] Question : Which of these operators is used to allocate memory for an object? [Single Correct] [ 1 Mark/s]
1 ) alloc
2) new
3 ) malloc
4 ) give
Answer Status: Correct
11 ] Question : Which of these access specifies can be used for a class member so that they can be accessed by
a different class in the same package? [Single Correct] [ 1 Mark/s]
1 ) Protected
2 ) No Modifier
3 ) Public
4) No Modifier or protected or public
Answer Status: Correct
12 ] Question : Which of these methods of InputStream class is used to read integer representation of next
available byte input? [Single Correct] [ 1 Mark/s]
1 ) scanf()
[Link] 6/12
6/1/2021 vmedulife Learner Dashboard
2 ) getInteger()
3 ) get()
4) read()
Answer Status: Correct
13 ] Question : Which of the following option is not permitted as base class (interface) to implement multiple
inheritance in java? [Single Correct] [ 1 Mark/s]
1 ) one class, two interfaces
2 ) two interfaces
3 ) one interface, one class
4) two classes
Answer Status: Correct
14 ] Question : length variable w.r.t array generates [Single Correct] [ 1 Mark/s]
1) maximum number of elements stored in array
2 ) Compile Time Error
3 ) number of elements assigned to array
4 ) Generates Defaults values.
[Link] 7/12
6/1/2021 vmedulife Learner Dashboard
Answer Status: Correct
15 ] Question : Which of these is method for testing whether the specified element is a file or a directory? [Single
Correct] [ 1 Mark/s]
1) isFile()
2 ) Isfile()
3 ) IsFile()
4 ) isfile()
Answer Status: Correct
16 ] Question : Which of the following keyword can be used in a subclass to call the constructor of its superclass?
[Single Correct] [ 1 Mark/s]
1 ) this()
2 ) parent()
3) super()
4 ) extends()
Answer Status: Correct
[Link] 8/12
6/1/2021 vmedulife Learner Dashboard
17 ] Question : Which of the following is the correct way of implementing an interface salary by class manager?
[Single Correct] [ 1 Mark/s]
1) class manager implements salary {}
2 ) class manager imports salary {}
3 ) class manager extends salary {}
4 ) class manager: public salary
Answer Status: Correct
18 ] Question : Which of the following is an incorrect statement about interfaces? [Single Correct] [ 1 Mark/s]
1 ) Interfaces are specified public if they are to be accessed by any code in the program
2 ) All variables in interface are implicitly final and static
3 ) Interfaces specifies what class must do but not how it does
4) All variables are static and methods are public if interface is defined pubic
Answer Status: Correct
19 ] Question : Which of these classes has methods to read primitive data type types from a file? [Single Correct] [
1 Mark/s]
[Link] 9/12
6/1/2021 vmedulife Learner Dashboard
1 ) FileInputStream
2) DataInputStream
3 ) InputStream
4 ) FileReader
Answer Status: Correct
20 ] Question : Which keyword is used by the method to refer to the object that invoked it? [Single Correct] [ 1
Mark/s]
1 ) catch
2 ) abstract
3 ) import
4) this
Answer Status: Correct
21 ] Question : Which of these keywords can be used to prevent Method overriding? [Single Correct] [ 1 Mark/s]
1 ) constant
2 ) protected
3 ) static
[Link] 10/12
6/1/2021 vmedulife Learner Dashboard
4) final
Answer Status: Correct
22 ] Question : All the variables in interface by default are? [Single Correct] [ 1 Mark/s]
1 ) default and static
2) public, static and final
3 ) default and final
4 ) protected, static and final
Answer Status: Incorrect
23 ] Question : Which of these access specifiers must be used for main() method? [Single Correct] [ 1 Mark/s]
1) public
2 ) protected
3 ) private
4 ) default
Answer Status: Correct
[Link] 11/12
6/1/2021 vmedulife Learner Dashboard
24 ] Question : Which of these keywords is used to prevent content of a variable from being modified? [Single
Correct] [ 1 Mark/s]
1 ) last
2) final
3 ) constant
4 ) static
Answer Status: Correct
25 ] Question : Which of these operators have highest precedence? [Single Correct] [ 1 Mark/s]
1 ) ++
2)*
3) ()
4 ) >>
Answer Status: Correct
[Link] 12/12