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
Ravi Panchal 8Ravi Panchal 8 

Method does not exist or incorrect signature: void printOutput(String) from the type Demo1

please help slove this i can't execute my appex class code
Whenever i try to execute my program i get this error .

public class Demo1 {
    
    public void printOutput(String stringToDisplay){
    System.debug('Display text: ' + stringToDisplay);
}


Demo1 d1 = new Demo1();
d1.printOutput('Hello World');

this what i am trying execute.
 
Best Answer chosen by Ravi Panchal 8
mukesh guptamukesh gupta
Hi Ravi,

I have checked in my org , Your code is perfect , please check again 

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh

All Answers

Shannon LucaShannon Luca
This thread might help you:
Shannon LucaShannon Luca
This thread might help you: https://www.peryourhealth.pro/
mukesh guptamukesh gupta
Hi Ravi,

I have checked in my org , Your code is perfect , please check again 

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh
This was selected as the best answer
PriyaPriya (Salesforce Developers) 

Hey Ravi,

I tried your code in my org and I did not get any error.

Can you please try again?

Thanks,

Priya Ranjan

Ravi Panchal 8Ravi Panchal 8
please help slove this i can't execute my appex class code Whenever i try to execute my program i get this error .