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 |
Q) I have a ArrayList object, in that object i have added 5 integer values, 5 float values, 5 string values. Now question is how can delete particular type of data ( i.e all int values or all float values or string values) in that list object at a time?
How do you convert an int to a double in java?
Can we synchronize static methods in java?
What is native code?
I Have a class abstract with one abstract method, so that method should override in the subclass, but i dont want to override, if i am not override what will happen? If compilation will occur then i dont want to give compilation error, then what we need to do??? See the sample program. public abstract class AbstractExample { public abstract void sampleMethod(); } public class AbstractExampleImple extends AbstractExample { }
Under what circumstances an object reference be cast to an interface reference?
What is ascii format?
Is Java Platform Independent if then how?
What is the difference between char and char *?
What are heterogeneous objects?
How can the checkbox class be used to create a radio button?
How to create two different thread class inside a main function?