答案 0 :(得分:0)
您需要通过JavaScript完成此操作并调整元素大小以覆盖窗口高度,因此请使用此函数检索高度并动态设置为div高度:
package com.java.inheritance;
import java.util.List;
public class MainClass {
public static void main(String[] args) {
try{
List<Student> sciencestudents=null;
List<Student> artstudnets=null;
Student s1= new Student("Asfakul",1,"Science");
Student s2=new Student("Arizul",2,"Science");
Student s3=new Student("Noor",3,"Arts");
sciencestudents.add(s1);
sciencestudents.add(s2);
artstudnets.add(s3);
Department d1=new Department("Science",sciencestudents);
Department d2=new Department("Arts",artstudnets);
List<Department> departmentlist=null;
departmentlist.add(d1);
departmentlist.add(d2);
Institute i1= new Institute("BEC",departmentlist);
System.out.println(i1.gettotalnoofStudents());
}catch(Exception e){
e.printStackTrace();
}
}
}
如果您需要更多信息
$(window).height(); // returns height of browser viewport