java 笔记

来源:互联网 发布:js 查找字符串 编辑:程序博客网 时间:2024/05/30 19:34
1、简单的输入、输入

import java.io.*;
import javax.swing.*;

public class testmain {

 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  String string = JOptionPane.showInputDialog(null, "x",
      "y", JOptionPane.QUESTION_MESSAGE);

  System.out.println("a = "+string);
 }

}