0% found this document useful (0 votes)
2 views2 pages

Java Questions List

The document outlines various fundamental concepts of Java programming, including exceptions, object-oriented programming principles, and class structures. It also provides syntax examples for declaring classes, interfaces, and arrays, as well as programming tasks to implement specific functionalities. Additionally, it discusses the characteristics of Java, such as platform independence and the role of JVM and JDK.

Uploaded by

ajaysir2k6
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)
2 views2 pages

Java Questions List

The document outlines various fundamental concepts of Java programming, including exceptions, object-oriented programming principles, and class structures. It also provides syntax examples for declaring classes, interfaces, and arrays, as well as programming tasks to implement specific functionalities. Additionally, it discusses the characteristics of Java, such as platform independence and the role of JVM and JDK.

Uploaded by

ajaysir2k6
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/ 2

1. Difference between checked and unchecked exceptions.

2. What does java.lang.StackTraceElement represent?

3. What are the characteristics of Java? Why is Java called platform-independent?

4. What do you mean by JVM and JDK?

5. List the concepts of OOPs.

6. Define class and object.

7. How will you declare an object?

8. Define inheritance.

9. List the types of inheritance.

10. Define abstraction and encapsulation.

11. What is meant by polymorphism? List its types.

12. Define array. How will you declare an array?

13. Define constructor. List its types.

14. Difference between method overriding and overloading.

15. Write the syntax for declaring a 2-D array.

16. What is the use of final keyword?

17. List the advantages of inheritance.

18. Compare abstract class and interface.

19. What is the use of super keyword?

20. Why multiple inheritance is not supported in Java?

21. How the constructor will be executed in multilevel hierarchy?

22. Write the syntax for declaring an interface.

23. What do you mean by static keyword in Java?

24. Compare multilevel inheritance and hierarchical inheritance.

25. What is meant by package in Java?

26. Write the syntax for declaring the package.


27. Write a Java program to create a class called "Animal" with a method called "makeSound".

Create a subclass called Cat that overrides the makeSound method to "bark".

28. Write a Java program to create a class called "Shape" with methods called "getParameter" and

"getArea". Create a subclass called Circle that overrides the methods to calculate the area and

perimeter of the circle.

29. Write a Java program to create an abstract class "Employee" with abstract methods

"calculateSalary" and "display". Create subclasses Manager and Programmer that extend the

Employee class and implement the respective methods to calculate the salary and their respective

roles.

30. Write a Java program to create an interface "Playable" with a method play() that takes no

arguments and returns void. Create 3 classes (Football, Volleyball, and Basketball) that implement

the Playable interface and override the play() method.

31. Create a simple calculator using class, object, and constructor.

32. Create five student objects to display the name and roll number of the students by suitable

constructors and methods.

33. Create a class "Vehicle". The subclasses are Truck, Car, and Motorcycle. Each subclass should

have make, model, year, and fuel type. Implement these methods to calculate the distance and

speed.

You might also like