function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NandhuNandhu 

Create an apex for the student like name, I’d, date of birth and how to fetch the record using constructor and method order

Best Answer chosen by Nandhu
Deepali KulshresthaDeepali Kulshrestha
Hi Nandhini,

I have gone through your problem please refer bellow code:- 
public class Testabc {
     String  name;
    integer  id;
    public Testabc(){
       name = 'xyz';
       id= 101;
       System.debug('Inside Constructor');
    }
    public void display(){
      System.debug('Name is =' +name);
      System.debug('Id is= '+id);
    }
}


I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com

All Answers

Danish HodaDanish Hoda
Hi Nandhini,

You can refer below code :
public class testClass{

    public student__c testClass(String id){
        return [SELECT Id, Name, DOB__C from student__c WHERE Id =:id];
    }
}

 
Deepali KulshresthaDeepali Kulshrestha
Hi Nandhini,

I have gone through your problem please refer bellow code:- 
public class Testabc {
     String  name;
    integer  id;
    public Testabc(){
       name = 'xyz';
       id= 101;
       System.debug('Inside Constructor');
    }
    public void display(){
      System.debug('Name is =' +name);
      System.debug('Id is= '+id);
    }
}


I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
This was selected as the best answer
Stephen Montgomery 6Stephen Montgomery 6
Deepali Kulshrestha, Thanks for this complete answer, I did this one too and it worked for me!
Stephen Montgomery 6Stephen Montgomery 6
I usually prefer to turn to someone who is good at this, last time I did an application for students that I got from here https://edubirdie.com/cheap-dissertation-writing-services ; it's nice that it's cheap dissertation writing service, usually after I write the application I need texts to fill with content and they clarify with this very well.
David HarborDavid Harbor
"Free online statistics help" serves as a valuable resource for students dealing with data analysis and interpretation - check https://www.geekandnerd.org/top-10-statistics-homework-help-services-2023/ for full details. It offers insights and explanations that enhance their grasp of statistical concepts, making the subject more approachable.