Real time Use of "This" Keyword

 

class StudentData4{
    int rollNo;
String name;
String course;
float fee;
//constructor to assign value;
StudentData4(int rollNo, String name,String course){
this.rollNo = rollNo;
this.name = name;
this.course = course;
}
StudentData4(int rollNo, String name,String course,float fee){
//this will reuse the upper constructor i.e having three parameters
//this statement should be first statement of constructor
this(rollNo,name,course);
this.fee = fee;
}

void display(){
System.out.println("Roll no of student is :" + rollNo);
System.out.println("Name of student is :" + name);
System.out.println("course of Student is :" + course);
System.out.println("Fee of student is :" + fee);
}
}
public class RealUseOfThis{
public static void main(String args[]){
StudentData4 s1 = new StudentData4(123,"Kalam","LLB");
StudentData4 s2 = new StudentData4(345,"Kejriwal","B.TECH",75000);
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...