Copying data of a object to another object without using Copy constructor


 public class Pupil1 {
int rollNo;
String name;
int age;

Pupil1(int r, String s, int a) {
rollNo = r;
name = s;
age = a;
}
Pupil1(){}


void display() {
System.out.println("Roll no of student is :" + rollNo);
System.out.println("Name of student is :" + name);
System.out.println("Age of student is :" + age);
}

public static void main(String args[]) {
Pupil1 p1 = new Pupil1(123, "Sudeep", 25);
Pupil1 p2 = new Pupil1();
p2.rollNo = p1.rollNo;
p2.name = p1.name;
p2.age = p1.age;
System.out.println("---------------------------------------------------");
System.out.println("Details of First Student");
p1.display();
System.out.println("---------------------------------------------------");
System.out.println("Details of Second Student copied from first Student");
System.out.println()
p2.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...