what is the Use of throws exception?
Answers were Sorted based on User's Feedback
Answer / ravikiran(aptech mumbai)
throws is used to throw the exception to it's calling method
| Is This Answer Correct ? | 14 Yes | 3 No |
it is used to throw the list of exceptions that a method
has to throw.
Syntax:
returntype methodname(list of args)throws
exception1,exception2{
body
}
| Is This Answer Correct ? | 15 Yes | 6 No |
When you declare a method as abstract method ?
How to declare objects of a class ?
0 Answers Akamai Technologies,
What is a class reference?
What is the difference between static and global variables and also define what are volatile variables?
0 Answers Flextronics, Hexaware,
What is void data type?
What is the use of private static?
What are the allowed, non-Unicode letter characters that can be used as the first character of an identifier?
hi to all,i have a question on static block. i saved below as test.java class test extends a { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p as static test static but if i change base class as test class then class test { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a extends test { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p test static explain me why "a static" wasn't print in second code when it is in derived class
How many bits is size_t?
Keywords in Exceptions?
What is ternary operator in java?
How can constructor chaining be done by using the super keyword?