CORE JAVA PROGRAMMING - Topics

CORE JAVA PROGRAMMING - Practice Problems

CORE JAVA PROGRAMMING - Practice Problems

1. Write a Java program that throws an exception and catch it using a try-catch block.

Tutorial

2. Write a Java program to create a method that takes an integer as a parameter and throws an exception if the number is odd.

Tutorial

3. Write a Java program to create a method that reads a file and throws an exception if the file is not found

Tutorial

4. Write a Java program that reads a list of numbers from a file and throws an exception if any of the numbers are positive

Tutorial

5. Write a Java program that reads a file and throws an exception if the file is empty.

Tutorial

6. Write a Java program that reads a list of integers from the user and throws an exception if any numbers are duplicates

Tutorial

7. Write a Java program to create a method that takes a string as input and throws an exception if the string does not contain vowels.

Tutorial

8. Write a Java program to connect the Java API to Database, if connection not successful then throw an exception

Tutorial

9. Write a Java program to manage the driver with path, username and password, if not successful then throw an exception

Tutorial

10. Write a Java program to throw the SQL Query, insert, delete, update, if not successful then throw an exception

Tutorial

11. Write a Java program to show an example of throws Keyword.

Tutorial

12. Write a Java program to show an example of multiple catch

Tutorial

13. Write a Java program to show an example of nested try block.

Tutorial

Expand Your Horizons with Our Free YouTube Courses

Our comprehensive YouTube courses cover a wide range of computer science and IT subjects. Each course is carefully crafted to provide you with a solid foundation and a deeper understanding of the topic. Explore our playlist of free courses and learn at your own pace. Stay ahead of the curve and boost your knowledge with our engaging video lectures.

Java Course

Learn Now

Data Structures Course

Learn Now

DBMS Course

Learn Now