Use of Static Variable with Class and Object


 class StudentData{
    int rollNo;
String name;
static String college = "VCE";

StudentData(int r, String s){
rollNo = r;
name = s;
}

void display(){
System.out.println("Roll no of student is :" + rollNo);
System.out.println("Name of student is :" + name);
System.out.println("Collge of student is :" + college);
}
}
public class TestStudent{
public static void main(String args[]){
StudentData s1 = new StudentData(123,"Niharika");
StudentData s2 = new StudentData(345,"Kayna");
System.out.println("---------------------------------------------------");
System.out.println("Details of First Student");
s1.display();
System.out.println("---------------------------------------------------");
System.out.println("Details of Second Student");
s2.display();
System.out.println("---------------------------------------------------");
}
}

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