📄 extractmethod.java
字号:
package com.xrefactory.refactorings;/* Select marked region with mouse and extract it into method named 'fib' using 'Xref -> Refactor' and 'Extract Method'.*/class ExtractMethod { public static void main(String[] args) { int i,n,x,y,t; n = Integer.parseInt(args[0]); // region begin x=0; y=1; for(i=0; i<n; i++) { t=x+y; x=y; y=t; } // region end System.out.println("" + n + "-th fib == " + x); }}/* F5 will bring you back to Index*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -