0% found this document useful (0 votes)
14 views1 page

Java Mock Exam Questions

Uploaded by

stevessmith210
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)
14 views1 page

Java Mock Exam Questions

Uploaded by

stevessmith210
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/ 1

Java Mock Exam Questions

1. Explain the concept of platform independence in Java. Why is bytecode important?

2. Differentiate between method overloading and method overriding with examples.

3. What are checked and unchecked exceptions? Give two examples of each.

4. Write a Java program to count the number of vowels in a given string.

5. Explain the difference between an abstract class and an interface. When would you use one over
the other?

6. Describe the life cycle of a thread in Java with a neat diagram.

7. List and explain the steps required to connect a Java program with a database using JDBC.

You might also like