- Arithmetic Exception:
It is thrown when an exceptional condition has occurred in an
arithmetic operation.
- ArrayIndexOutOfBoundException:
It is thrown to indicate that an array has been accessed with an illegal index.
The index is either negative or greater than or equal to the size of the array.
- ClassNotFoundException:
This Exception is triggered when we try to access a class whose definition is
not found.
- FileNotFoundException:
This Exception is thrown when a file is not accessible or does not open. Quite
common
- InterruptedException:
It is triggered when a thread is waiting , sleeping , or doing some processing
, and it is interrupted.
- NoSuchMethodException:
It is thrown when accessing a method which is not found.
- NullPointerException:
This exception is appeared when referring to the members of a null object.
- NumberFormatException:
This exception is thrown when a method could not convert a string into a
numeric format.
- StringIndexOutOfBoundsException:
It is thrown by String class methods to indicate that an index is either
negative than the size of the string.
- What is checked and unchecked exception?
1) Checked
Exception:
The classes which directly inherit Throwable class except the RuntimeException
and Error are called as checked exceptions e.g. IOException, SQLException etc.
Those exceptions are checked at compile-time.
2) Unchecked
Exception:
The classes which inherit RuntimeException are known as unchecked
exceptions e.g. ArithmeticException, ArrayIndexOutOfBoundsException ,NullPointerException
etc.
Unchecked exceptions are not checked at compile-time, but they are checked at runtime.
Unchecked exceptions are not checked at compile-time, but they are checked at runtime.
- What is Error?
Error is not recoverable e.g. OutOfMemoryError, VirtualMachineError,
AssertionError etc.
Learn (API-Microservice)Testing+(CoreJava+UI)-SDET with Self Paced Videos and one LIVE Doubt Session
Entire course content can be found below: COURSE CONTENTCheck below link for question and answers with code:
Want to learn more? ...Check below link for more java interview question:
- Interview questions for SDET/Automation Testing:
- Top 21 GIT interview questions
- Top 30 Selenium Webdriver Interview Q&A
- Top 20 API Testing Interview Q&ASelenium Interview Question SET-4
- Selenium Interview Question SET-1
- Selenium Interview Question SET-2
- Selenium Interview Questions SET-3
- Selenium Interview Question SET-4
Check below link on top Interview preparation:
SQL Query Cucumber-BDD Linux Commands Maven GIT
No comments:
Post a Comment