II B.Tech II Sem CSE Java Lab Exercise - 7a (Exception)

a) Exception handling mechanism

Aim: To write a JAVA program that describes exception handling mechanism


Description:


Program:

Usage of Exception Handling:

class trydemo 
{
public static void main(String args[]) 
{
try 
{
int a=10,b=0;
int c=a/b;
System.out.println(c);
}
catch(ArithmeticException e) 
{
System.out.println(e); 
}
System.out.println("After the catch statement"); 
}
}

Output:



No comments

File Uploading in PHP

  File Uploading in PHP PHP allow you to upload any type of a file i.e. image, binary or text files.etc..,PHP has one in built global variab...