Your first method · 你的第一个方法
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
English
Your first method
Now write a method. Don't write main — the checker calls your method with several inputs and checks what you return. Complete twice so it returns n times two.
中文
你的第一个方法
现在来写一个方法。不要写 main —— 检查器会用多个输入调用你的方法,并检查你 return 的结果。完成 twice,让它返回 n 的两倍。
Complete twice(int n) so it returns n times two. Don't write main. · 完成 twice(int n),让它返回 n 的两倍。不要写 main。
Click Run to see the output here. · 点击“运行”查看此处输出。