Tianyu's notes

4 out of 5 dentists recommend this WordPress.com site

can’t find Java desktop application troubleshoot

Support for [B]SAF (JSR 296, basically the framework that was behind your “Java Desktop Application” project template) has been abruptly dropped (for no valid reason, let me add). However, as … Continue reading

October 23, 2013 · Leave a comment

what is constructor in java

constructor, which is similar to a method but is used only at the time an object is created to initialize the object’s data. 用new给一个类创建对象的时候会自动调用该类的构造函数,给对象赋初值等;method是普通的方法,需要在时才调用它。 java构造函数 一般我们讲的“函数”就是“方法”; 构造函数=构造方法; 构造方法是一种特殊的方法,具有以下特点。 (1)构造方法的方法名必须与类名相同。 (2)构造方法没有返回类型,也不能定义为void,在方法名前面不声明方法类型。 (3)构造方法的主要作用是完成对象的初始化工作,它能够把定义对象时的参数传给对象的域。 … Continue reading

July 16, 2013 · Leave a comment

what’s [\\s*]*?foo –Predefined Character & Quantifiers

Predefined Character Classes Construct Description . Any character (may or may not match line terminators) \d A digit: [0-9] \D A non-digit: [^0-9] \s A whitespace character: [ \t\n\x0B\f\r] \S A non-whitespace character: [^\s] … Continue reading

July 11, 2013 · Leave a comment

Java 与 C++中static的用法

Java 建立一个static静态变量的method指这个method不需要创建一个此类的对象即可使用: class Simple{ static void go(){ //这个语句就已经可以直接运行了,不需再创建对象 System.out.println(“Go…”); } } public class Cal{ public static void main(String[] args){ Simple.go(); //调用一个静态(static)方法就是“类名.方法名” } } C++里的static中文叫全局变量,就是在函数外面定义的变量 全局变量只要在一个文件中定义后,在其他需要使用的源文件中只要使用extern关键字,即可在该文件中使用,概括下就是:extern扩展全局变量的作用域 extern in#include “stdio.h”t g_c; //其他文件中定义的全局变量 … Continue reading

July 11, 2013 · Leave a comment

Tsearch

(function() { var cx = '006458616484908826734:b2kcpves4mw'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })();

By Tianyu Guo

Design a site like this with WordPress.com
Get started