Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
197 views

Model Question Paper of Java Programming (1)

This document is a model question paper for the MCA Semester-III Java Programming course at Dr. Shyama Prasad Mukherjee University, Ranchi. It includes multiple choice questions, short answer questions, and long answer questions covering various topics in Java programming. The questions assess knowledge on Java concepts, syntax, and programming techniques.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
197 views

Model Question Paper of Java Programming (1)

This document is a model question paper for the MCA Semester-III Java Programming course at Dr. Shyama Prasad Mukherjee University, Ranchi. It includes multiple choice questions, short answer questions, and long answer questions covering various topics in Java programming. The questions assess knowledge on Java concepts, syntax, and programming techniques.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Dr.

Shyama Prasad Mukherjee University, Ranchi


PG Department of Mathematics & MCA

Model Question Paper


MCA, SEMESTER-III
Java Programming (ECMCA301A)

Group-A
Multiple Choice Questions (Compulsory)

1. Java is associated with _______ programming Language


a) Oak
b) Basic
c) C
d) Perl
2. Which Property does not hold good for Java.
a) Object oriented
b) Secure
c) dynamic
d) Complex
3. A compiler converts the Java program into an intermediate language
representation called ____________
a) byte code
b) byte
c) byte class
d) byte java
4. ________ Operator is used to create an object.
a) class
b) new
c) print
d) main
5. Which of the following is NOT a Java Keyword?
a) Abstract
b) Native
c) Package
d) Synchronize
6. Java platform consists of JVM and a package of readymade software
components this package is known as ___________.
a) Java API
b) JVM API
c) JM API
d) API
7. An _____ determines which features of a class may be used by other classes.
a) specifier
b) inheritance
c) implementation
d) Access specifier
8. Which of the following is not an Exceptions in Java.
a) ArithmeticException
b) NullPointerException
c) ArrayOutOfBoundsException
d) LogicalException.
9. Two kinds of data types in java are __________and __________.
a) Primitive, standard
b) Primitive, Abstract
c) abstract, derived
d) constants, variables
10. What will be the return type of a method that not returns any value?
a) void
b) int
c) double
d) None of the above
11. The variables declared in a class for the use of all methods of the class are
called.
a) reference variables
b) objects
c) instance variables
d) None of these
12. _______ method cannot be overridden.
a) Super
b) final
c) private
d) None of these
13. The String method compareTo() returns
a) true
b) int value
c) 1
d) -1
14. The class string belongs to ................. package.
a) java.awt
b) java.lang
c) java.applet
d) java.string
15. What is byte code in Java?
a) Code generated by a Java compiler
b) Code generated by a Java Virtual Machine
c) Name of Java source code file
d) Block of code written inside a class
16. Which one is true about a constructor?
a) A constructor must have the same name as the class it is declared within.
b) A constructor is used to create objects.
c) A constructor may be declared private
d) All of the above
17. The wrapping up of data and functions into a single unit is called.
a) Encapsulation
b) Abstraction
c) Data Hiding
d) Polymorphism
18. A package is a collection of
a) Classes
b) Interfaces
c) Classes and interfaces
d) Editing tools and interfaces.
19. What do you mean by >>> operator in Java
a) Left Shift Operator
b) Right Shift Operator
c) Zero Fill Right Shift
d) Zero Fill Left Shift
20. To successfully overload a method in Java, the method names must be
______.
a) Same
b) Different
c) Same or different
d) None

Group-B
Short Answer Type Questions

1. What are command line arguments? Give a suitable example.


2. What are JVM and the structure of JVM?
3. Explain with example of conditional operators? Give a suitable example.
4. What is Scanner class? Explain any five methods of Scanner class
5. Write a program input three numbers to find out greatest using nested if
statements.
6. Write a program input an alphabet to check the alphabet is vowel or not vowel
using switch case.
7. Write a program to calculate factorial of a given number using recursion.
8. Define method overloading. Give a suitable example
9. What is super keyword? When use super keyword? Give a suitable example.
10. Explain with example of final keyword in java.
11. Explain with example of any two string methods.
12. What is java.util package? Explain ArrayList class in Java.

Group-C
Long Answer Type Questions

1. What is a constructor? Explain with example of all types of constructor in Java.


2. What is Inheritance? Explain with examples of all types of inheritances
supported in Java.
3. a) Write a program to calculate addition of two complex numbers using passing
by value method.
b) What is Interface class? Explain how to perform in Multiple Inheritance in
Java?
4. a) What is method overriding? Explain the rules of method overriding and give
a suitable example.
b) What is user-defined package? How to create a user-defined package write
the steps.
5. What is exception? Explain the syntax of try block and catch block with a
suitable example.
******

You might also like