class Class {}
class Class1 extends Class {}
class Class2 extends Class {}
class Class3 extends Class {}
Class1 class1 = new Class1();
Class2 class2 = new Class2();
Class3 class3 = new Class3();
Class variable = new Class1();
if (sectionNumber == 0)
variable = class1;
else if (sectionNumber == 1)
variable = class2;
else if (sectionNumber == 2)
variable = class3;