17 lines
		
	
	
		
			410 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			17 lines
		
	
	
		
			410 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
|   | --- | ||
|  | title: Throw | ||
|  | --- | ||
|  | 
 | ||
|  | ## throw
 | ||
|  | The Java throw keyword is used to explicitly throw an exception.You can throw either checked or uncheked exception in java by throw keyword. The throw keyword is mainly used to throw custom exception. | ||
|  | 
 | ||
|  | ***Example:*** | ||
|  | ```java | ||
|  | throw new ArithmeticException("/ by zero not permitted"); | ||
|  | ``` | ||
|  | 
 | ||
|  | ##### More resources
 | ||
|  | 
 | ||
|  | [Geeks for Geeks](https://www.geeksforgeeks.org/throw-throws-java/) | ||
|  | 
 |