jjzjj

studentInfo

全部标签

java - 在 int 属性上按降序对自定义对象数组进行排序

我想按出生年份降序排列我的数组。我的数组还有两个其他类型的String元素。因此,例如,出生在最早年份(例如1939年)的人将排在首位,然后依此类推。这是我的代码:importjava.util.*;publicclassStudentInformationTest{publicstaticvoidmain(String[]args){StudentInformation[]studentInfo=newStudentInformation[10];studentInfo[0]=newStudentInformation("StudentA",1971,"BScFDIT");stude

c++ - 无法写入文件中的数据,程序C++没有错误

我无法在类中使用这些指针变量向文件写入数据。程序没有错误,但文件中没有写入数据。请有人告诉我我做错了什么。#include#includeclassstudentinfo{private:/*CreatingPrivateDataMembers*/char*VUID;char*campusID;char*Studentname;char*Fathername;public:voidStorefile();/*FunctiontoStoreDataintheFile*/charDisplay();/*FunctiontoReadandthenDisplayDatafromtheFile*

java - 自动完成 TextView 的选定项目显示为简单的 TextView ?

我正在使用自动完成TextView,它显示数据库中的一些名称。我想在我从自动完成TextView中选择的TextView中显示一个名称。这是我的代码:ArrayLists1=newArrayList();for(StudentInfocn:studentInfo){s1.add(cn.getName());}ArrayAdapteradapter=newArrayAdapter(this,android.R.layout.simple_dropdown_item_1line,s1);a1.setThreshold(1);a1.setAdapter(adapter);a1.setOnIt