ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>色偷偷久久一区二区三区,一区二区日本视频,国产精品视频免费看http://www.aygfsteel.com/allen/category/6815.htmlå¦ä¹ Java从零开å§?è§è¯2006-Java之èµ\zh-cnWed, 28 Feb 2007 06:16:53 GMTWed, 28 Feb 2007 06:16:53 GMT60- import myjava.PlotOtauå’Œimport myjava.*的区别?http://www.aygfsteel.com/allen/archive/2006/01/13/27981.htmlAllenAllenFri, 13 Jan 2006 15:10:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/13/27981.htmlhttp://www.aygfsteel.com/allen/comments/27981.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/13/27981.html#Feedback2http://www.aygfsteel.com/allen/comments/commentRss/27981.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27981.htmlimport myjava.*åQ?BR>import myjava.PlotOtauåQ?BR>真ä¸çŸ¥é“æ‰?/SPAN>*å·äؓ什么找ä¸åˆ°è·¯å¾„åQŸå³ä½¿package myjava里就一个PlotOtau.classã€?/SPAN>

]]> - ClassDemohttp://www.aygfsteel.com/allen/archive/2006/01/09/27310.htmlAllenAllenMon, 09 Jan 2006 12:50:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/09/27310.htmlhttp://www.aygfsteel.com/allen/comments/27310.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/09/27310.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27310.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27310.html 1
public class ClassDemo
2

{
3
public ClassDemo()
{}
4
5
public static void main(String[] args)
6
{
7
ClassDemo test=new ClassDemo();
8
System.out.println("The class of test is:"+test.getClass().getName());
9
try
{
10
Class c=Class.forName("java.lang.Object");
11
System.out.println(c.getPackage()+"\t");
12
System.out.println(c);
13
java.lang.reflect.Method[] m=c.getMethods();
14
System.out.println("The element in String[] is:"+String[].class.getComponentType());
15
System.out.println((new int[3][4][5][6]).getClass().getName());
16
System.out.println("The method defined in Object class:");
17
for(int i=0; i<m.length; i++)
18
{
19
System.out.println(m[i]);
20
}
21
}
22
catch(ClassNotFoundException e)
23
{
24
e.printStackTrace();
25
}
26
}
27
}
]]> - ComplexNumberhttp://www.aygfsteel.com/allen/archive/2006/01/09/27307.htmlAllenAllenMon, 09 Jan 2006 12:22:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/09/27307.htmlhttp://www.aygfsteel.com/allen/comments/27307.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/09/27307.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27307.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27307.html
1
public class ComplexNumber
2

{
3
private double x,y;
4
5
public ComplexNumber(double real,double imaginary)
6
{
7
this.x=real;
8
this.y=imaginary;
9
}
10
11
public double real()
12
{
13
return x;
14
}
15
16
public double imaginary()
17
{
18
return y;
19
}
20
21
public double magnitude()
22
{
23
return Math.sqrt(x*x+y*y);
24
}
25
26
public String toString()
27
{
28
return "{"+x+","+y+"}";
29
}
30
31
public static ComplexNumber add(ComplexNumber a,ComplexNumber b)
32
{
33
return new ComplexNumber(a.x+b.x,a.y+b.y);
34
}
35
36
public ComplexNumber add(ComplexNumber a)
37
{
38
return new ComplexNumber(this.x+a.x,this.y+a.y);
39
}
40
41
public static ComplexNumber multiply(ComplexNumber a,ComplexNumber b)
42
{
43
return new ComplexNumber(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);
44
}
45
46
public ComplexNumber multiply(ComplexNumber a)
47
{
48
return new ComplexNumber(x*a.x-y*a.y,x*a.y+y*a.x);
49
}
50
} 
]]> - ArrayPrinthttp://www.aygfsteel.com/allen/archive/2006/01/09/27289.htmlAllenAllenMon, 09 Jan 2006 10:04:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/09/27289.htmlhttp://www.aygfsteel.com/allen/comments/27289.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/09/27289.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27289.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27289.html
1
import java.io.*;
2
public class ArrayPrint
3

{
4
private int N;
5
private int[][] intarray;
6
ArrayPrint()
7
{
8
N=5;
9
intarray=new int[N][N];
10
}
11
ArrayPrint(int n)
12
{
13
N=n;
14
intarray=new int[N][N];
15
}
16
public void Print()
17
{
18
int i=0,j=0;
19
int i0=0,j0=0;
20
int count=1;
21
int Num=N-1;
22
while(Num>0)
23
{
24
for(i=i0,j=j0;j<Num;j++,count++)
25
{
26
intarray[i][j]=count;
27
}
28
for(i=i0;i<Num;i++,count++)
29
{
30
intarray[i][j]=count;
31
}
32
for(j=Num;j>j0;j--,count++)
33
{
34
intarray[i][j]=count;
35
}
36
for(i=Num;i>i0;i--,count++)
37
{
38
intarray[i][j]=count;
39
}
40
i0++;
41
j0++;
42
Num--;
43
}
44
if(N%2!=0)
45
{
46
intarray[N/2][N/2]=count;
47
}
48
for(i=0;i<N;i++)
49
{
50
for(j=0;j<N;j++)
51
{
52
String ar="0";
53
if(intarray[i][j]/10<1)
54
{
55
ar=" "+intarray[i][j];
56
}
57
else if(intarray[i][j]/100<1 && intarray[i][j]/10>=1)
58
{
59
ar=" "+intarray[i][j];
60
}
61
System.out.print(ar+" ");
62
}
63
System.out.println();
64
}
65
}
66
public static void main(String[] args) throws IOException
67
{
68
int order=0;
69
System.out.println("Please input the order of the square:(<10:)");
70
order=System.in.read();
71
order=order-'0';
72
ArrayPrint arr=new ArrayPrint(order);
73
arr.Print();
74
}
75
} 
]]> - StringBufferDemohttp://www.aygfsteel.com/allen/archive/2006/01/09/27247.htmlAllenAllenMon, 09 Jan 2006 05:27:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/09/27247.htmlhttp://www.aygfsteel.com/allen/comments/27247.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/09/27247.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27247.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27247.html
1
public class StringBufferDemo
2

{
3
public static void main(String[] args)
4
{
5
StringBuffer sb=new StringBuffer("Java");
6
double d=1.4;
7
sb.append(d).append("have").append(new String(" a lot of new features"));
8
System.out.println(sb);
9
sb.insert(4,"SDK");
10
System.out.println(sb);
11
sb.delete(4,10);
12
System.out.println(sb);
13
System.out.println(sb.reverse());
14
}
15
} 
]]> - StringDemohttp://www.aygfsteel.com/allen/archive/2006/01/09/27242.htmlAllenAllenMon, 09 Jan 2006 04:57:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/09/27242.htmlhttp://www.aygfsteel.com/allen/comments/27242.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/09/27242.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27242.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27242.html
1
public class StringDemo
2

{
3
public static void main(String[] args)
4
{
5
String myName="G. Leeman";
6
int length="æ¶‚é™é?/SPAN>".length();
7
System.out.println("长度1åQ?/SPAN>"+myName.length());
8
System.out.println("长度2åQ?/SPAN>"+length);
9
String name1="programming in java";
10
String name2="Programming in Java";
11
System.out.println("比较1åQ?/SPAN>"+name1.equals(name2));
12
System.out.println("比较2åQ?/SPAN>"+name2.equalsIgnoreCase(name2));
13
System.out.println("比较3åQ?/SPAN>"+name2.compareTo("Progam"));
14
System.out.println("å—符1åQ?/SPAN>"+name1.charAt(4));
15
System.out.println("å—符2åQ?/SPAN>"+name1.indexOf('a'));
16
System.out.println("å—符3åQ?/SPAN>"+name2.lastIndexOf('a'));
17
String subname="in";
18
System.out.println("å串1åQ?/SPAN>"+name1.substring(3,10));
19
System.out.println("å串2åQ?/SPAN>"+"abc".concat("123"));
20
System.out.println("å串3åQ?/SPAN>"+name2.startsWith("Pro"));
21
System.out.println("å串4åQ?/SPAN>"+name2.endsWith("in Java"));
22
System.out.println("å串5åQ?/SPAN>"+name1.indexOf(subname));
23
System.out.println("å串6åQ?/SPAN>"+name1.lastIndexOf(subname));
24
System.out.println("ž®å†™åQ?/SPAN>"+name2.toLowerCase());
25
System.out.println("大写åQ?/SPAN>"+name2.toUpperCase());
26
System.out.println("替æ¢åQ?/SPAN>"+name1.replace('a','A'));
27
}
28
} 
]]> - CharacterDemohttp://www.aygfsteel.com/allen/archive/2006/01/07/27005.htmlAllenAllenSat, 07 Jan 2006 09:59:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/07/27005.htmlhttp://www.aygfsteel.com/allen/comments/27005.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/07/27005.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27005.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27005.html
1
public class CharacterDemo
2

{
3
public CharacterDemo()
4
{
5
}
6
7
public static void main(String[] args)
8
{
9
Character c1=new Character('A');
10
Character c2=new Character('b');
11
System.out.println(c1.charValue()+0);
12
System.out.println(c2.charValue()+0);
13
int i=c1.compareTo(c2);
14
System.out.println(i);
15
if(i==0)
16
{
17
System.out.println("c1 is equal c2!");
18
}
19
else if(i<0)
20
{
21
System.out.println("c1 is smaller than c2!");
22
}
23
System.out.println(Character.toLowerCase('A')+""+Character.toUpperCase('a'));
24
System.out.println(Character.isDigit('9'));
25
}
26
} 
]]> - CalendarDemohttp://www.aygfsteel.com/allen/archive/2006/01/07/27004.htmlAllenAllenSat, 07 Jan 2006 09:58:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/07/27004.htmlhttp://www.aygfsteel.com/allen/comments/27004.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/07/27004.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27004.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27004.html
1
import java.util.*;
2
3
public class CalendarDemo
4

{
5
public static void main(String[] args)
6
{
7
Calendar instcalendar=Calendar.getInstance();
8
9
instcalendar.setTime(new Date());
10
11
String cyear=String.valueOf(instcalendar.get(Calendar.YEAR));
12
String cmonth=String.valueOf(instcalendar.get(Calendar.MONTH)+1);
13
String cdate=String.valueOf(instcalendar.get(Calendar.DAY_OF_MONTH));
14
String cday=String.valueOf(instcalendar.get(Calendar.DAY_OF_WEEK)-1);
15
16
int chour=instcalendar.get(Calendar.HOUR_OF_DAY);
17
int cminute=instcalendar.get(Calendar.MINUTE);
18
int csecond=instcalendar.get(Calendar.SECOND);
19
20
System.out.println("现在的时间是åQ?/SPAN>");
21
System.out.println(""+cyear+"òq?/SPAN>"+cmonth+"æœ?/SPAN>"+cdate+"æ—?/SPAN>"+"星期"+cday);
22
System.out.println(""+chour+"æ—?/SPAN>"+cminute+"åˆ?/SPAN>"+csecond+"¿U?/SPAN>");
23
24
instcalendar.set(2004,9,1);
25
long ctime2004=instcalendar.getTimeInMillis();
26
instcalendar.set(2005,9,1);
27
long ctime2005=instcalendar.getTimeInMillis();
28
long interdays=(ctime2005-ctime2004)/(1000*60*60*24);
29
30
System.out.println("2004òq?0æœ?日和2005òq?0æœ?日相éš?/SPAN>"+interdays+"å¤?/SPAN>");
31
}
32
}
33

]]> - DayShowerhttp://www.aygfsteel.com/allen/archive/2006/01/07/27002.htmlAllenAllenSat, 07 Jan 2006 09:56:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/07/27002.htmlhttp://www.aygfsteel.com/allen/comments/27002.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/07/27002.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27002.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27002.html
1
class DayShower
2

{
3
public static void main(String[] args)
4
{
5
int yearIn=2004;
6
int monthIn=2;
7
if(args.length>0)
8
{
9
monthIn=Integer.parseInt(args[0]);
10
}
11
if(args.length>1)
12
{
13
yearIn=Integer.parseInt(args[1]);
14
}
15
System.out.println(yearIn+"Äå^"+monthIn+"ÔÂÓÃ"+countDays(monthIn,yearIn)+"Ìì");
16
}
17
static int countDays(int month,int year)
18
{
19
int count=-1;
20
switch(month)
21
{
22
case 1:
23
case 3:
24
case 5:
25
case 7:
26
case 8:
27
case 10:
28
case 12: count=21;break;
29
case 4:
30
case 6:
31
case 9:
32
case 11: count=30;break;
33
case 2:
34
if(year%4==0)
35
{
36
count=29;
37
}
38
else
39
{
40
count=28;
41
}
42
if((year%100==0)&(year%400!=0))
43
{
44
count=28;
45
}
46
}
47
return count;
48
}
49
} 
]]> - MathDemohttp://www.aygfsteel.com/allen/archive/2006/01/07/27003.htmlAllenAllenSat, 07 Jan 2006 09:56:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/07/27003.htmlhttp://www.aygfsteel.com/allen/comments/27003.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/07/27003.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27003.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27003.html
1
public class MathDemo
2

{
3
public static void main(String[] args)
4
{
5
System.out.println("abs(-5)="+Math.abs(-5));
6
System.out.println("max(2.72,3.14)="+Math.max(2.72,3.14));
7
System.out.println("min(256,286)="+Math.min(256,286));
8
9
System.out.println("round(3.8)="+Math.round(3.8));
10
System.out.println("round(-3.8)="+Math.round(-3.8));
11
12
System.out.println("sqrt(2)="+Math.sqrt(2));
13
System.out.println("pow(2,3)="+Math.pow(2,3));
14
15
System.out.println("E="+Math.E);
16
System.out.println("exp(1)="+Math.exp(1));
17
System.out.println("log(e*e*e)="+Math.log((Math.E)*(Math.E)*(Math.E)));
18
19
System.out.println("ceil(3.14)="+(int)Math.ceil(3.14));
20
System.out.println("floor(3.14)="+(int)Math.floor(3.14));
21
22
System.out.println("pi="+Math.PI);
23
System.out.println("sin(pi/2)="+Math.sin(Math.PI/2));
24
System.out.println("cos(0)="+Math.cos(0));
25
}
26
} 
]]> - MaxVariableshttp://www.aygfsteel.com/allen/archive/2006/01/07/27001.htmlAllenAllenSat, 07 Jan 2006 09:55:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/07/27001.htmlhttp://www.aygfsteel.com/allen/comments/27001.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/07/27001.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/27001.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/27001.html
1
public class MaxVariables
2

{
3
public static void main(String[] args)
4
{
5
byte largestByte=Byte.MAX_VALUE;
6
short largestShort=Short.MAX_VALUE;
7
int largestInteger=Integer.MAX_VALUE;
8
long largestLong=Long.MAX_VALUE;
9
float largestFloat=Float.MAX_VALUE;
10
double largestDouble=Double.MAX_VALUE;
11
char aChar='S';
12
boolean aBoolean=true;
13
14
System.out.println("最大的byte值是åQ?/SPAN>"+largestByte);
15
System.out.println("最大的short值是åQ?/SPAN>"+largestShort);
16
System.out.println("最大的integer值是åQ?/SPAN>"+largestInteger);
17
System.out.println("最大的long值是åQ?/SPAN>"+largestLong);
18
System.out.println("最大的float值是åQ?/SPAN>"+largestFloat);
19
System.out.println("最大的doubble值是åQ?/SPAN>"+largestDouble);
20
if(Character.isUpperCase(aChar))
21
{
22
System.out.println("å—符"+aChar+"æ˜¯å¤§å†™å—æ¯?/SPAN>");
23
}
24
else
25
{
26
System.out.println("å—符"+aChar+"是å°å†™å—æ¯?/SPAN>");
27
}
28
System.out.println("布尔型å˜é‡çš„值是"+aBoolean);
29
}
30
} 
]]> - Test_javahttp://www.aygfsteel.com/allen/archive/2006/01/07/26999.htmlAllenAllenSat, 07 Jan 2006 09:52:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/07/26999.htmlhttp://www.aygfsteel.com/allen/comments/26999.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/07/26999.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/26999.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/26999.html
1
public class Test_java
2

{
3
public static void main(String[] args)
4
{
5
System.out.println("This is a Test'javapro!");
6
}
7
}
8

]]> - IntegerDemohttp://www.aygfsteel.com/allen/archive/2006/01/07/26997.htmlAllenAllenSat, 07 Jan 2006 09:44:00 GMThttp://www.aygfsteel.com/allen/archive/2006/01/07/26997.htmlhttp://www.aygfsteel.com/allen/comments/26997.htmlhttp://www.aygfsteel.com/allen/archive/2006/01/07/26997.html#Feedback0http://www.aygfsteel.com/allen/comments/commentRss/26997.htmlhttp://www.aygfsteel.com/allen/services/trackbacks/26997.html
1
public class IntegerDemo
2

{
3
public IntegerDemo()
{}
4
public static void main(String[] agrs)
5
{
6
Integer[] Integerarray=
{new Integer(20),new Integer(40),new Integer("110")};
7
for(int i=0;i<Integerarray.length;i++)
8
{
9
System.out.print(Integer.toBinaryString(Integerarray[i].intValue())+"\t");
10
System.out.print(Integer.toHexString(Integerarray[i].intValue())+"\t");
11
System.out.print(Integer.toOctalString(Integerarray[i].intValue())+"\t");
12
System.out.print(Integerarray[i]+"\r\n");
13
}
14
}
15
} 
]]>
Ö÷Õ¾Ö©Öë³ØÄ£°å£º
ÆÁ¶«ÊÐ|
Éñ³ØÏØ|
»¨Ô«ÏØ|
¸ñ¶ûľÊÐ|
·áÔÊÐ|
ÊÖ»ú|
ͨ½ÏØ|
ÙÈʦÊÐ|
ÁøÁÖÏØ|
³àË®ÊÐ|
Ìì½òÊÐ|
ÇåÔ·ÏØ|
°²ÈÊÏØ|
°ÝÈªÏØ|
ÄϰÄÏØ|
²¨ÃÜÏØ|
ÑγØÏØ|
×ÛÒÕ|
ÎÌÅ£ÌØÆì|
áéÖÝÊÐ|
Á¬ÔƸÛÊÐ|
ÐÅ·áÏØ|
Ƕ«|
±¦¼¦ÊÐ|
×ϽðÏØ|
ÄÏÀÖÏØ|
Ð˺ÍÏØ|
ÊÙÑôÏØ|
Ñô´ºÊÐ|
ÃçÀõÊÐ|
Ëç·ÒºÓÊÐ|
½ÁêÏØ|
Ô£ÃñÏØ|
¬ÍåÇø|
½ºÄÏÊÐ|
½±±Çø|
ÎåÁ«ÏØ|
Áúʤ|
»³ÈáÇø|
ƽ¶ÈÊÐ|
»ÝÖÝÊÐ|