Your first method
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
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.
Complete twice(int n) so it returns n times two. Don't write main.
Click Run to see the output here.