Using Static method

 

class StudentData1{
int rollNo;
String name;
static String college = "VCE";
//static method to change the value of college
static void alter(){
college = "MDU"; //changing value of static varible
college = "BBPS";
}
//constructor to assign value;
StudentData1(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 TestStudent1{
public static void main(String args[]){
StudentData1 s1 = new StudentData1(123,"Niharika");
StudentData1 s2 = new StudentData1(345,"Kayna");
StudentData1.alter(); //Calling static method alter();
System.out.println("------------------------------------------------");
System.out.println("Details of First Student");
s1.display();//calling display method
System.out.println("------------------------------------------------");
System.out.println("Details of Second Student");
s2.display();//calling display method
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...