Day 2 - core java

1.OOPs concept in Java 

2. Java Encapsulation

3. Java Inheritance

4. Java Polymorphism

5. Java Abstraction

6. Java Interface

7. Java Enums

8. Java Strings

9. Java Exceptions - Try...Catch

10. Java Custom Exception

11. the throws keyword is used to declare that a method can throw one or more exceptions. This is part of Java's exception handling mechanism, which allows methods to signal that an error has occurred, and the calling code should handle it. By using throws, you specify that the method may throw an exception, but the method does not handle it itself. It passes the responsibility of handling the exception to the caller.




Comments