2013年1月20日

摘要: 一、从命令行登录MySQL数据库服务器 1、登录使用默认3306端口的MySQL/usr/local/mysql/bin/mysql -u root -p2、通过TCP连接管理不同端口的多个MySQL(注意:MySQL4.1以上版本才有此项功能)/usr/local/mysql/bin/mysql -u root -p --protocol=tcp --host=localhost --port=33073、通过socket套接字管理不同端口的多个MySQL/usr/local/mysql/bin/mysql -u root -p --socket=/tmp/mysql3307.sock4、通 阅读全文
posted @ 2013-01-20 23:16 白雉一声 阅读(41918) 评论(2) 推荐(3) 编辑
 

2013年1月19日

摘要: 大家也都知道i++是先使用再自增,++i是先自增再使用,但实际中遇到看似简单的面试题还是会出错,下面是两个面试题:/*****test.java*******/public class test {static {int x=5;}//局部变量,不影响后面的x值static int x,y;//初始化x=0,y=0public static void main(String[] args){System.out.println(x);//这里输出是0,即第二次使用static声明x的时候x被默认赋值为0 x--; myMethod();System.out.println(x + y++ +x 阅读全文
posted @ 2013-01-19 14:21 白雉一声 阅读(215) 评论(0) 推荐(0) 编辑
 

2013年1月18日

摘要: 废话少说,先说个使用的例子吧~下面是实现一个系统的登录框public LoginFrame() {initComponents();setTitle("系统登录"); // 设置窗体标题setSize(260, 170); // 设置窗体大小Toolkit toolkit = getToolkit(); // 获得Toolkit对象Dimension dimension = toolkit.getScreenSize(); // 获得Dimension对象int screenHeight = dimension.height; // 获得屏幕的高度int screenWid 阅读全文
posted @ 2013-01-18 22:25 白雉一声 阅读(9939) 评论(0) 推荐(1) 编辑
 

2013年1月16日

摘要: indexof它所查出来的是你给的母字符中某一个字符的下标位置,以下引用自java1.6api文档:Returns the index within this string of the first occurrence of the specified character. If a character with value ch occurs in the character sequence represented by this String object, then the index (in Unicode code units) of the first such occurre 阅读全文
posted @ 2013-01-16 12:48 白雉一声 阅读(695) 评论(0) 推荐(0) 编辑