Setting and Getting the name of Current Thread

 


public class CurrentThreadName {

  public static void main(String[] args) {
    //to get name of current thread
    System.out.println(Thread.currentThread().getName());
    //to set name of current thread
    Thread.currentThread().setName("javainvent");
    //getting name of current thread after invoking set name
    //main thread name can also be changed
    //main thread is created by JVM
    System.out.println(Thread.currentThread().getName());
    System.out.println(0 / 0);
  }
}

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...