📄 huiwen.java
字号:
package huiwen;
import java.io.UnsupportedEncodingException;
import javax.swing.JOptionPane;
import javax.swing.JOptionPane;
public class Huiwen {
public static void main(String argc[]) throws UnsupportedEncodingException
{
String w;
w=JOptionPane.showInputDialog("请输入字符串");
char[] q1= w.toCharArray();
double st =System.nanoTime();
for(int i=w.length()-1;i>=0;i--)
{
System.out.print(q1[i]);
}
double et=System.nanoTime();
double x=et-st;
System.out.println();
System.out.println(et);
System.out.println(st);
System.out.println("时间是"+x+"纳秒=1000微秒=1000000纳秒");
System.out.println(w);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -