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
Vianney BANCILLONVianney BANCILLON 

Keyboard input in Apex

Hello all,
I'm starting with Apex.
Could you tell me what's the "Apex code" for this in Java:

Scanner sc=new Scanner(System.in);
String str= sc.nextline();
System.out.println(str);

In other words: how to get the keybord input in Apex?
Sorry if my english is not correct.

Thanks!

Vianney BANCILLON



 
SalesFORCE_enFORCErSalesFORCE_enFORCEr
To get the user input first you need to create a visualforce page which is the "View" in MVC architecture in Salesforce
https://developer.salesforce.com/page/An_Introduction_to_Visualforce