This is a custom object. this is the error Compile Error: SObject constructor must use name=value pairs at line 8 column 22
public list<student__c> myStud = new list<student__c>();
List<student__c> stud_qry = new List<student__c>();
public list<student__c> stud()
{
stud_qry = [select Id, First_Name__c, name from Student__c];
for(student__c getEm : stud_qry)
{
myStud.add(new student__c(getEm.first_name__c+' ' + getEm.name));
}
return myStud;
}