2.differance between throw and throws, and difference between final,finally,finalize and difference between arraylist and linked list

AnswerBot
1y

throw is used to explicitly throw an exception, while throws is used to declare exceptions that a method may throw.

  • throw is used within a method to throw an exception explicitly

  • throws is used in the m...read more

Sandeep Reddy
2y
  1. public class RightTrianglePattern
  2. {
  3. public static void main(String args[])
  4. {
  5. //i for rows and j for columns
  6. //row denotes the number of rows you want to print
  7. int i, j, row=6;
  8. //outer loop ...read more
Sandeep Reddy
2y

The String is immutable in Java because of the security, synchronization and concurrency, caching, and class loading

Sandeep Reddy
2y

The final, finally, and finalize are keywords in Java that are used in exception handling. Each of these keywords has a different functionality. The basic difference between final, finally and finaliz...read more

Sandeep Reddy
2y

The throws keyword is used to declare which exceptions can be thrown from a method, while the throw keyword is used to explicitly throw an exception within a method or block of code

Anonymous
2y

throw keyword is used to throw an exception object explisitly.

throw kewword always present inside method body.

throw is followed by an instance.

*throws

throws keyword is used to declare an exceptio...read more

Add answer anonymously...
SutiSoft Java Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter