www.baidu.com

JavaCode--我爱你,芳儿

JavaStudy--我爱你,芳儿

Java API introduce

Java类库由以下几个包组成:
java.lang
java.io
java.util
java.awt
java.applet
java.net

java基础类库在java.lang包中:
Object  class
method:
1.protected Object clone()
2.public boolean equals(Object obj)
3.public final class getClass()
4.protected void finalize()
5.public String toString()
6.public final void notify()

Math       class
method:
1.public static double abs(double d)
2.public static double exp(double d)求e的d次幂
3.public static double floor(double d)求不大于d的最大整数
4.public static double log(doulble d)求d 的自然对数
5.public static double max(double d1,double d2)
6.public static double min(double d1,double d2)
7.public static double pow(double d1,double d2)d1的d2次方
8.public static double random()获取0~1中的随机数
9.public static double rint(double d)求d的4舍5入
10.pulblic static double sqrt(double d)
11.public static double sin(double d)
12.public static double cos(double d)
13.public static double tan(double d)
此全为静态变量..可用Math.method()表示


System    class
属性:
public static InputStream in;
pulbic static PrintStream out;
public static PrintStream err;
method:
public static long currentTimeMillis()
public static void exit(int status)
public static void gc()强制调用虚拟机的垃圾回收功能


String      class
分为String 类和StringBuffer类
String:
构造函数:
public String();
public Stirng(StringValue);
public String(StringBuffer buffer);
public String(char value[]);
method:
public int length();
public boolean startsWith(String prefix)
public boolean endsWith(Stirng suffix)
查找字符串中指定的字符
public int indexOf(char ch)
public int indexOf(char ch,int fromIndex)
public int lastIndexOf(char ch)
public int lastInderOf(char ch,int fromIndex)
查找字符串中指定的子串
public int indexOf(String str)
public int indexOf(String str,int fromIndex)
public int lastIndexOf(String str)
public int lastInderOf(String str,int fromIndex)
比较两字符串:
public int compareTo(String str)
public boolean equals(Object obj)
public boolean equalsIgnoreCase(String str)
连接两字符串
public String concat(String str)
求字符串中的字符和子串
public char chaAt(int index)
public String substirng(int startIndex,int endIndex)
public String substring(int startIndex)

StringBuffer:
构造函数:
public StringBuffer()
public StringBuffer(int length)
public StringBuffer(String str)
method:
public int length()
public int capacity()
public void setLength(int newLength)
public charAt(int index)
public void setChartAt(int index,char ch)
public StringBuffer append(<参数类型> <参数名>)
public StringBuffer insert(int <输入位置>,<参数类型> <参数名>)



 

芳儿宝贝.我爱你

posted on 2007-12-08 11:30 wǒ愛伱--咾婆 阅读(1266) 评论(0)  编辑  收藏 所属分类: JavaBaseFiles


只有注册用户登录后才能发表评论。


网站导航:
 

导航

统计

公告

芳儿宝贝.我爱你


黑客基地
http://www.hackbase.com
全球最大的黑客门户网站


 最近在读的书:

常用链接

留言簿(1)

随笔分类(37)

JavaCode

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜