java·´Éä³£¼û·½·¨
»ñÈ¡classÀà·½·¨£º
1£¬getClass 2£¬Class.forName() 3,ÓÃ.class
public Field[] getDeclaredFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐÀàÐ͵ıäÁ¿£¬²»°üÀ¨¼Ì³Ð¸¸ÀàµÄ
public Field[] getDeclaredFields(String name)
·µ»ØÌض¨Ãû×Ö
public Field[] getFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐpublicÀàÐ͵ıäÁ¿£¬°üÀ¨¼Ì³Ð¸¸ÀàµÄ
public Field[] getFields(String name)
·µ»ØÌض¨Ãû×Ö
//»ñÈ¡¸Ã¶ÔÏóËùÊôÓڵİü
getPackage()
//»ñÈ¡¶ÔÏóËùÊôÀàµÄÐÞÊηû
int flag=class.getModifiers();
String modiferName=Modifier.toString(flag);
//·µ»Ø¸ÃClassËù´ú±íµÄ¶ÔÏóʵÏֵĽӿڵÄClassµÄÊý×é
Class[] iterClass=cls.getInterfaces();
//·µ»Ø¸¸ÀàµÄClassµÄÃû×Ö
Class supClass=cls.getSuperclass();
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
-
½üÈÕÔÚ±à³ÌÖÐÓõ½½Ó¿Ú֪ʶ,ÓÉÓڿα¾ÖжԽӿÚÃèÊö½ÏÉÙ,ËùÒÔÏë´ÓÍøÉϲéÕÒ×ÊÁÏ,µ«ÍøÉϵÄ×ÊÁÏ´ó¶àÒ²Ö»ÊÇÈß³¤µÄÃèÊö,ËùÒÔÔÚ´ËÌṩһ×Ô¼ºÐ´µÄʵÀý,¹©´ó¼Ò²Î¿¼:
ÔÌâÊÇÕâÑùµÄ£ºÔÚjavaÖУ¬¶¨ÒåÒ»¸ö½Ó¿Ú£¬ÉùÃ÷¼ÆË㳤·½ÐÎÃæ»ýºÍÖܳ¤µÄ³éÏó·½·¨£¬ÔÙÓÃÒ»¸öÀàȥʵÏÖÕâ¸ö½Ó¿Ú£¬ÔÙ±àдһ¸ö²âÊÔÀàȥʹÓÃÕâ¸ö½Ó¿Ú¡£
Ê×ÏÈ£¬½Ó¿Ú±ØÐ ......
ÎÒÃÇÀ´½éÉÜһϠ£½£½ºÍequals()µÄÇø±ð£¬£½£½ÊÇÏàµÈ£¬equals()Ò²ÊÇÏàµÈ¡£ÕâÁ½¸ö´ÊµÄÇø±ðÊÇʲôÄØ£¿ÕâÊÇÕÒ¹¤×÷ʱºÜ¶àÃæÊÔ¹ÙµÄÎÊÌâ¡£ÎÒÃÇÀ´½â´ðһϡ£Ê×ÏÈÎÒÃÇ¿´Õâô¸öÀý×Ó¡£Êµ¼ù£º
public class TestEquals {
public static void main(String[] args) {
MyDate date1 = new MyDate(14, 3, 1976);
MyDate date2 = ne ......
1.StudentList.java:
/**
*
* @author lucifer
*/
package JavaSerializable;
import java.util.*;
import java.io.*;
public class StudentList implements Serializable{
Vector list = new Vector(6);
public StudentList(){} ......