- 博客(19)
- 资源 (6)
- 收藏
- 关注
原创 64位整数
http://wenku.baidu.com/view/9c9be37202768e9951e73892.htmlhttp://wenku.baidu.com/view/e20df6717fd5360cba1adba8.html
2011-10-21 16:57:27 326
原创 route
#include#include#includestruct Node{struct Node* left;struct Node* right;int data;};int n = 0;int Cal(struct Node*);//计算int main(int argc,char* argv[]){scanf("%d",&n);struc
2011-10-19 20:18:34 281
原创 调试工具——gdb
gcc -o a.out a.cgdb -q ./a.outbreak maininfo register(i r)//////////////////////////////objdump -D a.out | grep -A20 main.: //转换
2011-10-11 16:46:36 507
原创 linux 代码学习
#include#include#includeint main(){ pid_t child_pid; child_pid = fork(); if(child_pid>0) {
2011-09-29 17:08:54 374
原创 关于JTextField
JTextField txtUsr = new JTextField(10);JPassWordField txtPwd = new JPassword(10);这里的10并不是设置可以输入的字节数或个数,实际它并不限制输入多少,可以无限输入;它只是设置外观看起来的长度而已。想
2011-09-27 20:59:34 1302
原创 简单面板管理
import java.awt.BorderLayout;import java.awt.Dimension;import java.awt.GridLayout;import java.awt.Toolkit;import javax.swing.JButton;i
2011-09-27 20:38:25 571
原创 JLabel_加载图片
在一本书上看到JLabel lblimage = new JLabel();ImageIcon image = CreatecdImage.add("login.jpg");lblimage.setIcon(image);可根本找不到CreatecdImage
2011-09-27 00:08:13 2482
原创 java.util.LinkedList
说明:Linked list implementation of the List interface. Implements all optional list operations, and permits all elements (includingnull). In a
2011-09-15 23:13:31 523
原创 java.util.List
说明:An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is i
2011-09-08 11:02:04 396
原创 Object_String----eqals--源代码
代码如下:Object的equal()代码:public boolean equals(Object obj) { return (this == obj); }String的equals()代码: public boolean equals(Object anObject) { if (this == anObject) { return true; } if (anObject instanceof String) { String anotherString = (String)anO
2011-05-11 16:27:00 299
原创 String_shod be so difficiult
闲话少说,先看程序吧:public class StringTest{ public static void main(String[] args){ Object object = new Object(); Object object2 = new Object(); System.out.println( object == object2 ); System.out.println("--------------"); String str = new
2011-05-10 22:12:00 331
原创 Polymorphysim
<br />public class Polymorphysim{ public static void main(String[] args){ Animal dog = new Dog(); Cat cat = (Dog)dog; }}class Animal{ public void sing(){ System.out.println("Animal is singing"); }}class Dog extends Animal{ pu
2011-05-10 16:03:00 369
原创 Constractor_this的用法
<br />先看一段小程序:<br />public class Constractor{ public static void main(String[] args){ constest cons = new constest(); }}class constest{ public constest(){ System.out.println("no parameter"); this(6); } public constest(int i){
2011-05-10 08:47:00 552
原创 Inheritance-java
<br />先看程序:<br />public class Inheritance{ public static void main(String[] args){ Apple apple = new Apple(); System.out.println(apple.name); }}class Fruit{ String name = "fruit";}class Apple extends Fruit{}<br />程序输出结果为:frui
2011-05-10 08:42:00 402
原创 singleton_单实例
<br />今天了解了java模式的第一个模式singleton模式:即只能有一个实例,先看程序:<br />public class SingletonTest{ public static void main(String[] args){ Singleton singleton = Singleton.getInstance(); }}class Singleton{ private static Singleton singleton = new Singleton()
2011-05-09 22:41:00 263
原创 java_redefine
<br />程序如下:<br />public class Test{ public static void main(String[] args){ for(int i = 0 ; i < 4 ; i++ ){ try{ switch(i){ case 0: char c = "123456".charAt(100); break; case 1: int[] a = null; a[0] = 10;
2011-05-09 22:30:00 448
原创 static_续
2011-05-09 12:47:49程序如下://静态代码块public class StaticTest{ public statci void main(String[] args){ P p = new P(); P p2 = new P(); new R(); new R();}}class P{ static{ System.out.println("static block");} public P(){ Syste
2011-05-09 12:59:00 199
原创 java-final关键字
<br />首先以段程序开始:<br /> <br />public class FinalTest{ public static void main(String[] args){ People people = new People();// people.address = new Address(); people.address.name = "guangan"; System.out.println(people.address.name); }}cl
2011-05-09 11:32:00 218
原创 终于开始学习javal了,遇难题了
在拖了很久之后,终于在这个学期放下其他,开始学习javal了。。。哎,今天遇到了一个小问题,可是花费了我半个小时啊!!!是因为写了 public Stirng test{}; 编译时,老师说在test时加个;分号,原来是少了();即public String test(){}
2011-05-08 21:25:00 440
Gvim 的新版
2011-09-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人