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

Java Questions

The document outlines various fundamental concepts in Java, including the Java Virtual Machine (JVM), bytecode, and the differences between JDK, JRE, and JVM. It also covers object-oriented programming principles such as inheritance, encapsulation, polymorphism, and method overloading, along with control structures like loops and conditional statements. Additionally, it includes programming tasks and examples to illustrate these concepts.

Uploaded by

moon.knight.1503
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)
4 views

Java Questions

The document outlines various fundamental concepts in Java, including the Java Virtual Machine (JVM), bytecode, and the differences between JDK, JRE, and JVM. It also covers object-oriented programming principles such as inheritance, encapsulation, polymorphism, and method overloading, along with control structures like loops and conditional statements. Additionally, it includes programming tasks and examples to illustrate these concepts.

Uploaded by

moon.knight.1503
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/ 2

1. What is JVM? Explain its role in Java.

2. Define bytecode and its significance in Java.

3. What is the difference between JDK, JRE, and JVM?

4. Explain the concept of object-oriented programming (OOP).

5. What is inheritance? Provide a simple example.

6. Explain method overloading with an example.

7. What is encapsulation in Java?

8. Define constructor and explain the types of constructors in Java.

9. What is the ‘this’ keyword in Java? Explain its usage.

2. Control Structures

1. What is a loop in Java? Name the different types of loops.

2. Explain the working of the for-each loop with an example.

3. What is the difference between if-else and switch statements?

4. What is the purpose of the break and continue statements in loops?

3. Object-Oriented Programming (OOP)

1. What is polymorphism? Give an example.

2. Define method overriding. How is it different from overloading?

3. What is an abstract class? Give an example.

4. What are interfaces in Java? How are they different from abstract classes?

5. Write down difference between abstract class and interface.


6. Explain use of ‘this’ keyword.
7. Write a program to check whether number is palindrome or not

8. Describe ‘super’ keyword with example.

9. How we can access package? Explain.

10. Write a program to demonstrate runtime polymorphism

11. Explain features of java in detail.

12. Wtite a program for marker interface create a class Product(prod_id,prod_name,prod_cost,


product_quantity) default and parameterized constructor. Create object an display the
content of each objectand also display the object count.

c) Write a menu driven program to perform following operations :

i) calculate circumference of circle.


ii) factorial of given number.

iii) Number is even or odd.

iv) exit.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy