0% found this document useful (0 votes)
7 views

JAVA__MID-1_QUESTION_BANK[1]

The document is a question bank for a Mid-I examination, containing short answer and long answer questions focused on Java programming concepts. Topics include the differences between classes and objects, variable scope, control statements, object-oriented programming principles, and method functionalities. It also covers advanced concepts like overloaded constructors, argument passing, method overriding, and access control.

Uploaded by

lakshmimahaa999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

JAVA__MID-1_QUESTION_BANK[1]

The document is a question bank for a Mid-I examination, containing short answer and long answer questions focused on Java programming concepts. Topics include the differences between classes and objects, variable scope, control statements, object-oriented programming principles, and method functionalities. It also covers advanced concepts like overloaded constructors, argument passing, method overriding, and access control.

Uploaded by

lakshmimahaa999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Mid - I Question Bank

Short answer questions

1. What is the difference between a class and an object in Java?


2. What is the scope of a variable in Java?
3. What is a switch statement in Java? When would you use it?
4. What are nested classes in Java?
5. What is the this keyword in Java, and how is it used?
6. What is method overloading in Java?

Long answer questions


UNIT - I

1. How can command-line arguments be passed to a Java program? Provide an example of


how they can be accessed within a program.
2. What is Object-Oriented Programming (OOP)? Explain its four main principles.
3. What is the syntax and purpose of a do-while loop? In what scenario would you prefer it
over a while loop?
4. What is type casting? Differentiate between implicit and explicit type casting with
examples.
5. Explain the use of the final keyword in Java. What are its implications when applied to
variables, methods, and classes?
6. What are literal constants in Java? Provide examples.

UNIT -II

7. Explain the concept of overloaded constructors. Provide an example where multiple


constructors are used in a class.
8. Discuss the difference between passing arguments by value and by reference. How does
Java handle argument passing?
9. What is method overriding in Java? How does it differ from method overloading?
10. What is the this keyword in Java? Explain its significance with examples.
11. Discuss the concept of access control in methods. How do access modifiers affect method
visibility
12. What is the role of the static keyword in methods? How do static methods differ from
instance methods?

You might also like