What is the difference between throw and throws?
Answer Posted / balaji
throw:it is used to raise exception explicitly
that means it is use when a user defined exception is raised
throws:if a method is capable of throwing an exception but
it does not handle the exception that must be specified by
using "throws" class
| Is This Answer Correct ? | 23 Yes | 1 No |
Post New Answer View All Answers
what do you mean by stream pipelining in java 8? Explain
What's the access scope of protected access specifier?
How many ways can we create the string object?
State differences between C and Java?
What is the size of int?
Can you extend singleton class?
Is jdk required on each machine to run a java program?
In a container there are 5 components. I want to display all the component names, how will you do that?
Does java support function overloading, pointers, structures, unions or linked lists?
What is wrapper class example?
What are the two types of java programming?
What is the abstraction?
public class Test { public static void main(String[] args) { int countA = 0; int countB = 0; int countC = 0; int countD = 0; int countE = 0; int countF = 0; int countG = 0; int countH = 0; int countI = 0; int countJ = 0; int countK = 0; int countL = 0; int countM = 0; int countN = 0; int countO = 0; int countP = 0; int countQ = 0; int countR = 0; int countS = 0; int countT = 0; int countU = 0; int countV = 0; int countW = 0; int countX = 0; int countY = 0; int countZ = 0; } } Can anybody tell me any alternate solution(like loop or something) to automate this initialization process. Ex:- for(char chr='A';chr<='Z'; chr++) { (int) String "count"+chr = 0; }
What is the new line character?
How do weakhashmap works?