0% found this document useful (0 votes)
98 views8 pages

Core Java BSC

Uploaded by

technodhruv7
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)
98 views8 pages

Core Java BSC

Uploaded by

technodhruv7
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/ 8

Shivaji University, Kolhapur

Question Bank for March 2022 (Summer) Examination


B.Sc. Part – III Semester – VI (CBCS)
Computer Science Paper – IX
Core Java
Subject Code: 79728

Q.1. Select the correct alternative and rewrite the sentence.


1. The command-line arguments are passes at _______________.
a) run-time b) the time of executing a Java program
c) compile-time d) the time of compiling a Java program

2. Which is the alternative to SWITCH in Java language?


a) break, continue b) for, while
c) if, else d) goto, exit

3. When exceptions in Java do arise in code sequence?


a) Run Time b) Can Occur Any Time
c) Compilation Time d) None of these

4. Java source code is compiled into ___________


a) source code b) .obj
c) .exe d) byte code

5. _________ keyword indicates that you are making a new class that drives
from an existing class.
a) extent b) extend
c) extends d) extents

6. What is a higher data type in Java language?


a) A data type which holds more data than other data types
b) A data type whose size is more than other data types
c) A data type which can hold more precision digits than other data types
d) All the above
7. Which of the following is a method having same name as that of it’s class?
a) finalize b) delete
c) class d) constructor

8. _____________ method of Thread class is used to find out the priority given
to a thread.
a) Get() b) ThreadPriority()
c) GetPriority() d) GetThreadPriority()

9. Which keyword is used for accessing the features of a package?


a) import b) extends
c) export d) imports

10. Java does not support ___________ inheritance.


a) single b) multiple
c) multilevel d) hierarchical

11. Which method is called only once during the run time of your applet?
a) stop() b) paint()
c) init() d) destroy()

12. Which is a perfect example of runtime polymorphism?


a) Method overloading b) Method overriding
c) Constructor overloading d) constructor overriding

13. _____ keyword used to invoke immediate parent class method.


a) super b) final
c) static d) finalize

14. Which of the access specifier can be used for an interface?


a) Private b) Protected
c) Public d) Any Access Specifier
15. To prevent any method from overriding, we declare the method as _______.
a) super b) final
c) static d) finalize

16. Which component is used to compile, debug and execute the java programs?
a) JRE b) JIT
c) JDK d) JVM

17. Runnable is a _________ .


a) class b) abstract class
c) interface d) variable

18. The finalize() method is called just prior to __________________ .


a) An object, variable or method goes out of scope.
b) An object or variable goes out of scope.
c) A variable goes out of scope.
d) Before garbage collection.

19. The implicit return type of a constructor is ___________ .


a) void b) int
c) a class object in which it is defined d) there is no return type.

20. Which of the modifier can't be used for constructors?


a) public b) private
c) protected d) static

21. What notifyAll() method do?


a) Wakes up one threads that are waiting on this object's monitor
b) Wakes up all threads that are not waiting on this object's monitor
c) Wakes up all threads that are waiting on this object's monitor
d) None of the above
22. When a class extends the Thread class ,it should override __________ method
of Thread class to start that thread.
a) start() b) run()
c) init() d)go()

23. ___________________ is used to include classes like Calender, Collection


and Date etc.
a) java.util b) java.io
c) java.net d) java.awt

24. The built-in base class in Java, which is used to handle all exceptions, is
a) Raise b) Exception
c) Error d) Throwable

25. Which one of the following is correct?


a) Java applets can not be written in any programming language
b) An applet is not a small program
c) An applet can be run on its own
d) Applets are embedded in other applications

26. What is the extension of java code files?


a) .js b) .txt
c) .class d) .java

27. Which one of the following is not a Java feature?


a) Object-oriented b) Use of pointers
c) Portable d) Dynamic and Extensible

28. A package is a collection of ____________________.


a) classes b) interfaces
c) Both a & b d) None of these
29. What is a higher data type in Java language?
a) A data type which holds more data than other data types
b) A data type whose size is more than other data types
c) A data type which can hold more precision digits than other data types
d) All the above

30. Which of these is a super class of all errors and exceptions in the Java
language?
a) RunTimeExceptions b) Throwable
c) Catchable d) None of these

31. In java a thread can be created by __________________.


a) Extending the thread class. b) Implementing Runnable interface.
c) Both of a & b d) None of these

32. Which of the following is used to make an Abstract class?


a) Making at least one member function as pure virtual function
b) Making at least one member function as virtual function
c) Declaring as Abstract class using virtual keyword
d) Declaring as Abstract class using static keyword

33. AWT stands for _________________.


a) Abstract Window Toolkit b) Absolute Window Toolkit
c) Abstract Window Team d) Absolute Window Team

34. __________ state means that the thread is ready for execution.
a) Running b) Run
c) Runnable d) StartRun

35. Applet can be embedded in a __________ file.


a) MS Word b) PHP
c) JavaScript d) HTML
36. In which package in Java, we can find the Exception class?
a) java.lang b) java.util
c) java.io d) java.awt

37. What is the use of final keyword in Java?


a) When a class is made final, a sublcass of it can not be created.
b) When a method is final, it can not be overridden.
c) When a variable is final, it can be assigned value only once.
d) All of these

38. Which of the following constructor of class Thread is valid one?


a) Thread(Runnable threadOb, int priority)
b) Thread(int priority)
c) Thread(Runnable threadOb, String threadName)
d) Thread(String threadName, int priority)

39. ____________ method cannot be overridden.


a) super b) static
c) final d) private

40. In Java, when we implement an interface method, it must be declared as


________
a) private b) protected
c) public d) friend

Q.2. Attempt Any Two of the following.

1. Explain type casting with example.


2. What is thread priority? Explain it in detail.
3. What do you mean by applets? Explain life cycle of applets with suitable diagram.
4. Explain any four arithmetic operators used in Java.
5. What is package? How to create and use user defined packages in Java.
6. What is polymorphism? Explain compile-time polymorphism with example.
7. What is interface? How to implement an interface?
8. Explain in brief different types of data types supported by Java?
9. What is mean by packages? List out different in-built types of packages in Java.
10. Explain the life cycle of Applet.
11. Explain the term with example.
i. Class
ii. Object
iii. Method
12. What is package? Explain how to create and access package in Java.
13. Explain looping statements used in Java with example.
14. What do you mean by exception handling? Explain various types of built-in
exceptions available in Java?
15. What do you mean by multithreading? How to create and extend thread class.
Explain it with syntax and example.

Q.3. Attempt Any Four of the following

1. Discuss about Java Virtual Machine in detail.


2. Explain the concept of method overriding with example.
3. What is constructor? Explain parameterized constructor with suitable example.
4. Write the different features of Java
5. What is package? How it is defined?
6. What is inheritance? Explain single level inheritance with suitable example.
7. What is inheritance? Explain multi level inheritance with suitable example.
8. Discuss about Java Virtual Machine in detail.
9. Explain multiple catch statement with example.
10. What is an applet? Explain life cycle of an applet.
11. Explain applet life cycle.
12. What is abstract class and method? Give its example.
13. Explain multiple catch statement with example.
14. What is Inheritance? Explain hierarchical inheritance with example.
15. Explain the difference between C++ and Java.
16. Explain the concept of AWT.
17. What is type casting? Explain it with example.
18. Explain in brief syntax of exception handling code.
19. Explain the features of Java
20. Define a package. List out different system packages of Java
21. Explain the concept of thread priority.
22. How to add applet code into HTML file.
23. Difference between method overloading and method overriding
24. Explain the concept of AWT.
25. What is polymorphism? Explain run-time polymorphism.
26. Explain abstract class with example.
27. What is multithreading? Explain thread priority in detail.
28. Define AWT package? Explain various component classes used in AWT
package?
29. Explain applet life cycle.
30. Explain the concept of this keyword.

You might also like