Example of Try and Catch in Exception Handling.

 

public class TryAndCatchExample{
public static void main(String[] args) {
try {
int a=100;
int b = 0;
int c = a/b;
System.out.println(c);
} catch (Exception e) {
// e.printStackTrace();
// System.out.println(e);
System.out.println(e.toString());
//System.out.println(e.getMessage());
}
System.out.println("hello");
}
}

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...