我想在 JDoodle Api 中接受用户输入
我正在使用以下数据
$postData = array(
"script" => $code,
"language" => $language,
"versionIndex" => "2",
"clientId" => "ed3d8b92ac70bc1c3ad2382d334afc1d",
"clientSecret" => $hiddenKey
);
我正在创建以下上下文请求
$context = stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => "Content-Type: application/json\r\n",
'content' => json_encode($postData)
)
));
如何在 JDoodle Api 中为以下代码获取用户输入?
import java.util.Scanner;
public class MainClass {
public static void main(String[] Args) {
System.out.println("Enter x = ");
Scanner scanner = new Scanner(System.in);
int x = scanner.nextInt();
System.out.println("X = "+x);
}
}