??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧洲日产国码无码久久99,亚洲人成未满十八禁网站,朝桐光亚洲专区在线中文字幕http://www.tkk7.com/supercrsky/articles/171391.html々上善若水?/dc:creator>々上善若水?/author>Sat, 29 Dec 2007 00:14:00 GMThttp://www.tkk7.com/supercrsky/articles/171391.htmlhttp://www.tkk7.com/supercrsky/comments/171391.htmlhttp://www.tkk7.com/supercrsky/articles/171391.html#Feedback2http://www.tkk7.com/supercrsky/comments/commentRss/171391.htmlhttp://www.tkk7.com/supercrsky/services/trackbacks/171391.html1介绍JAVA中的Collection FrameWork(包括如何写自q数据l构)? 
{:Collection FrameWork
如下Q?br /> Collection
├List
│├LinkedList
│├ArrayList
│└Vector
?/span> 
└Stack
└Set
Map
├Hashtable
├HashMap
└WeakHashMap

2.抽象cM接口Q?/span>

{:抽象cM接口都用于抽象,但是抽象c?/span>(JAVA?/span>)可以有自q部分实现Q而接口则完全是一个标?/span>(同时有多重承的功能)?br />

3.

STRING?/span>STRINGBUFFER的区别?/span> 
{:STRING的长度是不可变的Q?/span>STRINGBUFFER的长度是可变的。如果你对字W串中的内容l常q行操作Q特别是内容要修ҎQ那么?/span>StringBufferQ如果最后需?/span>StringQ那么?/span>StringBuffer?/span>toString()Ҏ



]]>
2007最后一套JAVA面试?内部c?http://www.tkk7.com/supercrsky/articles/171105.html々上善若水?/dc:creator>々上善若水?/author>Fri, 28 Dec 2007 02:52:00 GMThttp://www.tkk7.com/supercrsky/articles/171105.htmlhttp://www.tkk7.com/supercrsky/comments/171105.htmlhttp://www.tkk7.com/supercrsky/articles/171105.html#Feedback0http://www.tkk7.com/supercrsky/comments/commentRss/171105.htmlhttp://www.tkk7.com/supercrsky/services/trackbacks/171105.html内部cȝ实现方式:
package com.test;

public class
 OuterClass
{
    
static int
 a ;
    
int
 b ;
    
private class
 InnerClass
    
{
        
public
 InnerClass()
        
{
            System.out.println(
"InnerClass create:" +
 a);
        }

    }

    
    
public OuterClass()
    
{
        InnerClass ic 
= new
 InnerClass();
        System.out.println(
"OuterClass create"
);
    }

    
    
public static void main(String[] args)
    
{
        OuterClass oc 
= new
 OuterClass();
    }

}

ȝ:

一.静态内部类可以有静态成员,而非静态内部类则不能有静态成员?

?静态内部类的非静态成员可以访问外部类的静态变量,而不可访问外部类的非静态变量;

?非静态内部类的非静态成员可以访问外部类的非静态变?/span>

]]>
2007最后一套JAVA面试?l承)http://www.tkk7.com/supercrsky/articles/171099.html々上善若水?/dc:creator>々上善若水?/author>Fri, 28 Dec 2007 02:36:00 GMThttp://www.tkk7.com/supercrsky/articles/171099.htmlhttp://www.tkk7.com/supercrsky/comments/171099.htmlhttp://www.tkk7.com/supercrsky/articles/171099.html#Feedback5http://www.tkk7.com/supercrsky/comments/commentRss/171099.htmlhttp://www.tkk7.com/supercrsky/services/trackbacks/171099.htmll承时候类的执行顺序问?一般都是选择?问你会打印Z?
package com.test;

public class
 Parent
{
    
//1

    static int a =  1;
    
//2

    static
    
{
        a 
= 10
;
        System.out.println(
"parent static code"
);
    }

    
//4
    public Parent()
    
{
        System.out.println(
"Parent constructor"
);
        System.out.println(
"Parent a=" +
 a);
    }

    
    
public static void main(String[] args)
    
{
        System.out.println(
"***************"
);
        Parent c 
= new
 Child();
    }

}


class Child extends Parent
{
    
static int a = 2
;
    
//3

    static 
    
{
        a 
= 20
;
        System.out.println(
"child static code"
);
    }

    
//5
    public Child()
    
{
        System.out.println(
"Child constructor"
);
        System.out.println(
"Child var a=" +
 a);
    }

    
}


输出l果:
parent static code
child 
static
 code
***************

Parent constructor
Parent a
=10
Child constructor
Child var a
=20

由此可看出在q没有实例化cȝ时?注意*?已经执行了static代码块?br /> 序是先父类后子c?
然后才调用父cȝ构造方?再调用子cȝ构造方?是q个序?
package com.test;

public class
 Parent
{
    
//1

    static int a =  1;
    
//2

    static
    
{
        a 
= 10
;
        System.out.println(
"parent static code"
);
    }

    
//4
    public Parent()
    
{
        System.out.println(
"Parent constructor"
);
        System.out.println(
"Parent a=" +
 a);
    }

    
    
public static void main(String[] args)
    
{
        System.out.println(
"***************"
);
        Parent c 
= new
 Child();
    }

}


class Child extends Parent
{
    
static int a = 2
;
    
//3

    static 
    
{
        a 
= 20
;
        System.out.println(
"child static code"
);
    }

    
//5
    public Child()
    
{
        System.out.println(
"Child constructor"
);
        System.out.println(
"Child var a=" +
 a);
    }

    
}



]]>
2007最后一套JAVA面试?l合?http://www.tkk7.com/supercrsky/articles/171086.html々上善若水?/dc:creator>々上善若水?/author>Fri, 28 Dec 2007 02:09:00 GMThttp://www.tkk7.com/supercrsky/articles/171086.htmlhttp://www.tkk7.com/supercrsky/comments/171086.htmlhttp://www.tkk7.com/supercrsky/articles/171086.html#Feedback0http://www.tkk7.com/supercrsky/comments/commentRss/171086.htmlhttp://www.tkk7.com/supercrsky/services/trackbacks/171086.html

l合?/span>

1、作用域public,private,protected,以及不写时的区别
{:区别如下Q?br /> 作用?nbsp;          当前c?nbsp;      同一package       子孙c?nbsp;      其他package
public            √             
        √                  √              √
protected        √                    √                  √             ×
friendly          √                    √                  ×             ×
private           √                     ×                  ×             ×
不写旉认ؓfriendly

2、ArrayList和Vector的区?HashMap和Hashtable的区?br /> {:ArrayList与Vector主要从二斚w来说.
一.同步?Vector是线E安全的Q也是说是同步的,而ArrayList是线E序不安全的Q不是同步的
?数据增长:当需要增长时,Vector默认增长为原来一培,而ArrayList却是原来的一?br /> HashMap与HashTable主要从三斚w来说?br /> 一.历史原因:Hashtable是基于陈旧的DictionarycȝQHashMap是Java 1.2引进的Map接口的一个实?br /> ?同步?Hashtable是线E安全的Q也是说是同步的,而HashMap是线E序不安全的Q不是同步的
?|只有HashMap可以让你空gZ个表的条目的key或value

3、char型变量中能不能存贮一个中文汉?Z?
{:是能够定义成Z个中文的Q因为java中以unicode~码Q一个char?(16bit)个字节,所以放一个中文是没问题的

4、多U程有几U实现方?都是什?同步有几U实现方?都是什?
{:多线E有两种实现ҎQ分别是l承ThreadcM实现Runnable接口
同步的实现方面有两种Q分别是synchronized,wait与notify.



]]>
2007最后一套JAVA面试题及{案(Floatl?http://www.tkk7.com/supercrsky/articles/171076.html々上善若水?/dc:creator>々上善若水?/author>Fri, 28 Dec 2007 01:45:00 GMThttp://www.tkk7.com/supercrsky/articles/171076.htmlhttp://www.tkk7.com/supercrsky/comments/171076.htmlhttp://www.tkk7.com/supercrsky/articles/171076.html#Feedback0http://www.tkk7.com/supercrsky/comments/commentRss/171076.htmlhttp://www.tkk7.com/supercrsky/services/trackbacks/171076.htmlpublic class Test2
{
    
public static void
 main(String[] args)
    
{
        Float a 
= new Float(3.4
);
        System.out.println(a.SIZE);
        a 
= new Float(34000
);
        System.out.println(a.SIZE);
    }


}

让我们来看看此程序会输出什么呢?
我们先来看看JDK的解释吧.
public static final int SIZE
The number of bits used to represent a 
float value. 

意思是?通常LqC个float值的位数.
q个是一个常?来看看源码吧:
 public static final int SIZE = 32;

final int 变量一旦被定义׃能被改变~


]]>
2007最后一套JAVA面试题解?Float)http://www.tkk7.com/supercrsky/articles/171070.html々上善若水?/dc:creator>々上善若水?/author>Fri, 28 Dec 2007 01:37:00 GMThttp://www.tkk7.com/supercrsky/articles/171070.htmlhttp://www.tkk7.com/supercrsky/comments/171070.htmlhttp://www.tkk7.com/supercrsky/articles/171070.html#Feedback0http://www.tkk7.com/supercrsky/comments/commentRss/171070.htmlhttp://www.tkk7.com/supercrsky/services/trackbacks/171070.htmlpublic class Test2
{
    
public static void
 main(String[] args)
    
{
        
float a = 3.4
;
    }


}

q个单的E序能不能编译通过呢?
其实是不能的?br /> 原因是精度问题,应该用强制类型{?
float a = (float)3.4;

再来看看q个能不能编译通过
public class Test2
{
    
public static void
 main(String[] args)
    
{
        Float a 
= new Float(3.4
);
        
    }


}
其实是没问题的?br /> 我们来看看Floatcȝ源代码吧:
  public Float(double value) {
    
this.value = (float
)value;
    }

其中有一个构造方法在Ҏ里已l进行了向下转型?br /> 所以这样写是没有问题的.

]]>
两道Java面试题解?/title><link>http://www.tkk7.com/supercrsky/articles/167952.html</link><dc:creator>々上善若水?/dc:creator><author>々上善若水?/author><pubDate>Sat, 15 Dec 2007 07:21:00 GMT</pubDate><guid>http://www.tkk7.com/supercrsky/articles/167952.html</guid><wfw:comment>http://www.tkk7.com/supercrsky/comments/167952.html</wfw:comment><comments>http://www.tkk7.com/supercrsky/articles/167952.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.tkk7.com/supercrsky/comments/commentRss/167952.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/supercrsky/services/trackbacks/167952.html</trackback:ping><description><![CDATA[<p><span style="font-family: Comic Sans MS"><span style="color: red"><span style="font-family: Comic Sans MS">内容摘要Q本文通过写出代码l果的方式向你解析了java面试中常面倒的几个知识点:string,equals(),==.<br /> </span></span><br /> <br /> 1.写出下面代码的结?/span></p> <p><span style="font-family: Comic Sans MS"> </p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img id="Codehighlighter1_24_221_Open_Image" onclick="this.style.display='none'; Codehighlighter1_24_221_Open_Text.style.display='none'; Codehighlighter1_24_221_Closed_Image.style.display='inline'; Codehighlighter1_24_221_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_24_221_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_24_221_Closed_Text.style.display='none'; Codehighlighter1_24_221_Open_Image.style.display='inline'; Codehighlighter1_24_221_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /><span style="color: #000000"> </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> TestString</span><span id="Codehighlighter1_24_221_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_24_221_Open_Text"><span style="color: #000000">{<br /> <img id="Codehighlighter1_63_91_Open_Image" onclick="this.style.display='none'; Codehighlighter1_63_91_Open_Text.style.display='none'; Codehighlighter1_63_91_Closed_Image.style.display='inline'; Codehighlighter1_63_91_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_63_91_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_63_91_Closed_Text.style.display='none'; Codehighlighter1_63_91_Open_Image.style.display='inline'; Codehighlighter1_63_91_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> link(String a)</span><span id="Codehighlighter1_63_91_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_63_91_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        a </span><span style="color: #000000">+=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">World</span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img id="Codehighlighter1_136_218_Open_Image" onclick="this.style.display='none'; Codehighlighter1_136_218_Open_Text.style.display='none'; Codehighlighter1_136_218_Closed_Image.style.display='inline'; Codehighlighter1_136_218_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_136_218_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_136_218_Closed_Text.style.display='none'; Codehighlighter1_136_218_Open_Image.style.display='inline'; Codehighlighter1_136_218_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> main(String[] args)</span><span id="Codehighlighter1_136_218_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_136_218_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        String a </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Hello</span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        link(a);<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        System.out.println(a);<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" /> }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <p><br /> {? q道题考两个方?</span></p> <p><span style="font-family: Comic Sans MS">1). String对象的内Ҏ不能改变?a+="World"q不是把a所指对象改?</span></p> <p><span style="font-family: Comic Sans MS">  而是先生成一个时String对象,其gؓa+"World",然后在把q个临时</span></p> <p><span style="font-family: Comic Sans MS">  对象赋给a.</span></p> <p><span style="font-family: Comic Sans MS">2). Java中函数参C递方式ؓCall by value,linkҎ中会生a的一?/span></p> <p><span style="font-family: Comic Sans MS">  拯,同样指向a所指的对象,l合以上两点,得出l果?Hello</span></p> <p><span style="font-family: Comic Sans MS"> </span></p> <p><span style="font-family: Comic Sans MS">2.写出下面代码的结?/span></p> <p><span style="font-family: Comic Sans MS"> </p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000">System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">ja</span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">va</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">java</span><span style="color: #000000">"</span><span style="color: #000000">);</span></div> <p></span> </p> <p><span style="font-family: Comic Sans MS">{?"=="用来比较对象的引?而equals()用来比较对象的内?但是如果是字W串帔R,?=="也可以比较内?/span></p> <p><span style="font-family: Comic Sans MS">是否相等,"ja"+"va"?java"都是字符串常?因此l果为true</span></p> <p><span style="font-family: Comic Sans MS">同理,下面代码l果也是true</span></p> <p> </p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff">final</span><span style="color: #000000"> String str </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">java</span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" />System.out.println(str</span><span style="color: #000000">==</span><span style="color: #000000">"</span><span style="color: #000000">java</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <p> </p> <img src ="http://www.tkk7.com/supercrsky/aggbug/167952.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/supercrsky/" target="_blank">々上善若水?/a> 2007-12-15 15:21 <a href="http://www.tkk7.com/supercrsky/articles/167952.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JAVAW试题(金山软gQ?/title><link>http://www.tkk7.com/supercrsky/articles/167912.html</link><dc:creator>々上善若水?/dc:creator><author>々上善若水?/author><pubDate>Sat, 15 Dec 2007 02:43:00 GMT</pubDate><guid>http://www.tkk7.com/supercrsky/articles/167912.html</guid><wfw:comment>http://www.tkk7.com/supercrsky/comments/167912.html</wfw:comment><comments>http://www.tkk7.com/supercrsky/articles/167912.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.tkk7.com/supercrsky/comments/commentRss/167912.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/supercrsky/services/trackbacks/167912.html</trackback:ping><description><![CDATA[1.<br /> 选出用法错误? <br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000">a: Stirng a </span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">Gone With Wind</span><span style="color: #000000">"</span><span style="color: #000000">; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />String t</span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Wind</span><span style="color: #000000">"</span><span style="color: #000000">; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />String m; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />m</span><span style="color: #000000">=</span><span style="color: #000000">a</span><span style="color: #000000">-</span><span style="color: #000000">t; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />B: Stirng a </span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">Gone With Wind</span><span style="color: #000000">"</span><span style="color: #000000">; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />String m ; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />m</span><span style="color: #000000">=</span><span style="color: #000000">a[</span><span style="color: #000000">3</span><span style="color: #000000">]</span><span style="color: #000000">+</span><span style="color: #000000">"</span><span style="color: #000000">one</span><span style="color: #000000">"</span><span style="color: #000000">; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />C: Stirng a </span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">Gone With Wind</span><span style="color: #000000">"</span><span style="color: #000000">; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />Sting m; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />m</span><span style="color: #000000">=</span><span style="color: #000000">a.toUpperCase(); <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />D: 不记得了 </span></div> <br /> 选AB.<br /> <br /> 2.<br /> 选出能正赋值的: <br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img id="Codehighlighter1_15_78_Open_Image" onclick="this.style.display='none'; Codehighlighter1_15_78_Open_Text.style.display='none'; Codehighlighter1_15_78_Closed_Image.style.display='inline'; Codehighlighter1_15_78_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_15_78_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_15_78_Closed_Text.style.display='none'; Codehighlighter1_15_78_Open_Image.style.display='inline'; Codehighlighter1_15_78_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> A </span><span id="Codehighlighter1_15_78_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_15_78_Open_Text"><span style="color: #000000">{ <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000"> a; <br /> <img id="Codehighlighter1_60_74_Open_Image" onclick="this.style.display='none'; Codehighlighter1_60_74_Open_Text.style.display='none'; Codehighlighter1_60_74_Closed_Image.style.display='inline'; Codehighlighter1_60_74_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_60_74_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_60_74_Closed_Text.style.display='none'; Codehighlighter1_60_74_Open_Image.style.display='inline'; Codehighlighter1_60_74_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> change(</span><span style="color: #0000ff">int</span><span style="color: #000000"> m) </span><span id="Codehighlighter1_60_74_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_60_74_Open_Text"><span style="color: #000000">{ <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #0000ff">return</span><span style="color: #000000"> m; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />}</span></span><span style="color: #000000"> <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: #000000"> <br /> <img id="Codehighlighter1_105_203_Open_Image" onclick="this.style.display='none'; Codehighlighter1_105_203_Open_Text.style.display='none'; Codehighlighter1_105_203_Closed_Image.style.display='inline'; Codehighlighter1_105_203_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_105_203_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_105_203_Closed_Text.style.display='none'; Codehighlighter1_105_203_Open_Image.style.display='inline'; Codehighlighter1_105_203_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> B </span><span style="color: #0000ff">extends</span><span style="color: #000000"> A</span><span id="Codehighlighter1_105_203_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_105_203_Open_Text"><span style="color: #000000">{ <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">int</span><span style="color: #000000"> b; <br /> <img id="Codehighlighter1_149_200_Open_Image" onclick="this.style.display='none'; Codehighlighter1_149_200_Open_Text.style.display='none'; Codehighlighter1_149_200_Closed_Image.style.display='inline'; Codehighlighter1_149_200_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_149_200_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_149_200_Closed_Text.style.display='none'; Codehighlighter1_149_200_Open_Image.style.display='inline'; Codehighlighter1_149_200_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> main() </span><span id="Codehighlighter1_149_200_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_149_200_Open_Text"><span style="color: #000000">{ <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />A aa </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> A(); <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />B bb </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> B(); <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> k; <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #008000">//</span><span style="color: #008000">px </span><span style="color: #008000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" /></span><span style="color: #000000">}</span></span><span style="color: #000000"> <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: #000000"> <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />在px处可以正赋值的? <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />A k</span><span style="color: #000000">=</span><span style="color: #000000"> m; B k</span><span style="color: #000000">=</span><span style="color: #000000">b; C k</span><span style="color: #000000">=</span><span style="color: #000000">aa.a; D k</span><span style="color: #000000">=</span><span style="color: #000000">bb.change(</span><span style="color: #000000">30</span><span style="color: #000000">); E k</span><span style="color: #000000">=</span><span style="color: #000000">bb.a <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span></div> <br /> 选C <br /> 3.<br /> 此程序会输出什?<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff">package</span><span style="color: #000000"> com;<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> A<br /> <img id="Codehighlighter1_22_108_Open_Image" onclick="this.style.display='none'; Codehighlighter1_22_108_Open_Text.style.display='none'; Codehighlighter1_22_108_Closed_Image.style.display='inline'; Codehighlighter1_22_108_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_22_108_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_22_108_Closed_Text.style.display='none'; Codehighlighter1_22_108_Open_Image.style.display='inline'; Codehighlighter1_22_108_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_22_108_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_22_108_Open_Text"><span style="color: #000000">{    <br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> A()<br /> <img id="Codehighlighter1_39_50_Open_Image" onclick="this.style.display='none'; Codehighlighter1_39_50_Open_Text.style.display='none'; Codehighlighter1_39_50_Closed_Image.style.display='inline'; Codehighlighter1_39_50_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_39_50_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_39_50_Closed_Text.style.display='none'; Codehighlighter1_39_50_Open_Image.style.display='inline'; Codehighlighter1_39_50_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_39_50_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_39_50_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        a1();<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> a1()<br /> <img id="Codehighlighter1_72_105_Open_Image" onclick="this.style.display='none'; Codehighlighter1_72_105_Open_Text.style.display='none'; Codehighlighter1_72_105_Closed_Image.style.display='inline'; Codehighlighter1_72_105_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_72_105_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_72_105_Closed_Text.style.display='none'; Codehighlighter1_72_105_Open_Image.style.display='inline'; Codehighlighter1_72_105_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_72_105_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_72_105_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">A-a1</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> B </span><span style="color: #0000ff">extends</span><span style="color: #000000"> A<br /> <img id="Codehighlighter1_136_336_Open_Image" onclick="this.style.display='none'; Codehighlighter1_136_336_Open_Text.style.display='none'; Codehighlighter1_136_336_Closed_Image.style.display='inline'; Codehighlighter1_136_336_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_136_336_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_136_336_Closed_Text.style.display='none'; Codehighlighter1_136_336_Open_Image.style.display='inline'; Codehighlighter1_136_336_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_136_336_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_136_336_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> bb </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> B()<br /> <img id="Codehighlighter1_165_182_Open_Image" onclick="this.style.display='none'; Codehighlighter1_165_182_Open_Text.style.display='none'; Codehighlighter1_165_182_Closed_Image.style.display='inline'; Codehighlighter1_165_182_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_165_182_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_165_182_Closed_Text.style.display='none'; Codehighlighter1_165_182_Open_Image.style.display='inline'; Codehighlighter1_165_182_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_165_182_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_165_182_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        bb </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1000</span><span style="color: #000000">;<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> a1()<br /> <img id="Codehighlighter1_204_274_Open_Image" onclick="this.style.display='none'; Codehighlighter1_204_274_Open_Text.style.display='none'; Codehighlighter1_204_274_Closed_Image.style.display='inline'; Codehighlighter1_204_274_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_204_274_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_204_274_Closed_Text.style.display='none'; Codehighlighter1_204_274_Open_Image.style.display='inline'; Codehighlighter1_204_274_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_204_274_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_204_274_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">bb is </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> bb);<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">B-a1</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> main(String[] args)<br /> <img id="Codehighlighter1_318_333_Open_Image" onclick="this.style.display='none'; Codehighlighter1_318_333_Open_Text.style.display='none'; Codehighlighter1_318_333_Closed_Image.style.display='inline'; Codehighlighter1_318_333_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_318_333_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_318_333_Closed_Text.style.display='none'; Codehighlighter1_318_333_Open_Image.style.display='inline'; Codehighlighter1_318_333_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_318_333_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_318_333_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">new</span><span style="color: #000000"> B();<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <br /> {案:<br /> bb is 0<br /> B-a1<br /> 看看执行序明白了.<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff">package</span><span style="color: #000000"> com;<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> A<br /> <img id="Codehighlighter1_22_112_Open_Image" onclick="this.style.display='none'; Codehighlighter1_22_112_Open_Text.style.display='none'; Codehighlighter1_22_112_Closed_Image.style.display='inline'; Codehighlighter1_22_112_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_22_112_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_22_112_Closed_Text.style.display='none'; Codehighlighter1_22_112_Open_Image.style.display='inline'; Codehighlighter1_22_112_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_22_112_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_22_112_Open_Text"><span style="color: #000000">{    <br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">3</span><span style="color: #008000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> A()<br /> <img id="Codehighlighter1_43_54_Open_Image" onclick="this.style.display='none'; Codehighlighter1_43_54_Open_Text.style.display='none'; Codehighlighter1_43_54_Closed_Image.style.display='inline'; Codehighlighter1_43_54_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_43_54_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_43_54_Closed_Text.style.display='none'; Codehighlighter1_43_54_Open_Image.style.display='inline'; Codehighlighter1_43_54_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_43_54_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_43_54_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        a1();<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> a1()<br /> <img id="Codehighlighter1_76_109_Open_Image" onclick="this.style.display='none'; Codehighlighter1_76_109_Open_Text.style.display='none'; Codehighlighter1_76_109_Closed_Image.style.display='inline'; Codehighlighter1_76_109_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_76_109_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_76_109_Closed_Text.style.display='none'; Codehighlighter1_76_109_Open_Image.style.display='inline'; Codehighlighter1_76_109_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_76_109_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_76_109_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">A-a1</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> B </span><span style="color: #0000ff">extends</span><span style="color: #000000"> A<br /> <img id="Codehighlighter1_140_358_Open_Image" onclick="this.style.display='none'; Codehighlighter1_140_358_Open_Text.style.display='none'; Codehighlighter1_140_358_Closed_Image.style.display='inline'; Codehighlighter1_140_358_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_140_358_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_140_358_Closed_Text.style.display='none'; Codehighlighter1_140_358_Open_Image.style.display='inline'; Codehighlighter1_140_358_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span id="Codehighlighter1_140_358_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_140_358_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> bb </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">2</span><span style="color: #008000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> B()<br /> <img id="Codehighlighter1_173_195_Open_Image" onclick="this.style.display='none'; Codehighlighter1_173_195_Open_Text.style.display='none'; Codehighlighter1_173_195_Closed_Image.style.display='inline'; Codehighlighter1_173_195_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_173_195_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_173_195_Closed_Text.style.display='none'; Codehighlighter1_173_195_Open_Image.style.display='inline'; Codehighlighter1_173_195_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_173_195_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_173_195_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #008000">//</span><span style="color: #008000">5</span><span style="color: #008000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">        bb </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1000</span><span style="color: #000000">;<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">4</span><span style="color: #008000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> a1()<br /> <img id="Codehighlighter1_221_291_Open_Image" onclick="this.style.display='none'; Codehighlighter1_221_291_Open_Text.style.display='none'; Codehighlighter1_221_291_Closed_Image.style.display='inline'; Codehighlighter1_221_291_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_221_291_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_221_291_Closed_Text.style.display='none'; Codehighlighter1_221_291_Open_Image.style.display='inline'; Codehighlighter1_221_291_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_221_291_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_221_291_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">bb is </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> bb);<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">B-a1</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> main(String[] args)<br /> <img id="Codehighlighter1_335_355_Open_Image" onclick="this.style.display='none'; Codehighlighter1_335_355_Open_Text.style.display='none'; Codehighlighter1_335_355_Closed_Image.style.display='inline'; Codehighlighter1_335_355_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_335_355_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_335_355_Closed_Text.style.display='none'; Codehighlighter1_335_355_Open_Image.style.display='inline'; Codehighlighter1_335_355_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_335_355_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_335_355_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #008000">//</span><span style="color: #008000">1</span><span style="color: #008000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">        </span><span style="color: #0000ff">new</span><span style="color: #000000"> B();<br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <br /> <span style="color: red">在方法被a1()被重写的情况?父类的a1是没有机?br /> 被调用的.</span> <img src ="http://www.tkk7.com/supercrsky/aggbug/167912.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/supercrsky/" target="_blank">々上善若水?/a> 2007-12-15 10:43 <a href="http://www.tkk7.com/supercrsky/articles/167912.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>华ؓ面试?~10http://www.tkk7.com/supercrsky/articles/167581.html々上善若水?/dc:creator>々上善若水?/author>Thu, 13 Dec 2007 11:45:00 GMThttp://www.tkk7.com/supercrsky/articles/167581.htmlhttp://www.tkk7.com/supercrsky/comments/167581.htmlhttp://www.tkk7.com/supercrsky/articles/167581.html#Feedback0http://www.tkk7.com/supercrsky/comments/commentRss/167581.htmlhttp://www.tkk7.com/supercrsky/services/trackbacks/167581.html
Which two are equivalent? (Choose two)
A. 
<%= YoshiBean.size%>
B. 
<%= YoshiBean.getSize()%>
C. 
<%= YoshiBean.getProperty("size")%>
D. 
<jsp:getProperty id="YoshiBean" param="size"/>
E. 
<jsp:getProperty name="YoshiBean" param="size"/>
F. 
<jsp:getProperty id="YoshiBean" property="size"/>
G. 
<jsp:getProperty name="YoshiBean" property="size"/>
此题考查的是JavaBean在jsp中的取值方式.
其中C和G效果是一LQ?br /> 所以此题选G.

7.
Which of the following statements regarding the lifecycle of a session bean are correct? 
1. java.lang.IllegalStateException is thrown if SessionContext.getEJBObject() is invoked when a stateful session bean instance is passivated. 
2. SessionContext.getRollbackOnly() does not throw an exception when a session bean with bean-managed transaction demarcation is activated. 
3. An exception is not thrown when SessionContext.getUserTransaction() is called in the afterBegin method of a bean with container-managed transactions. 
4. JNDI access to java:comp/env is permitted in all the SessionSynchronization methods of a stateful session bean with container-managed transaction demarcation. 
5. Accessing resource managers in the SessionSynchronization.afterBegin method of a stateful session bean with bean-managed transaction does not throw an exception.


W二部分Q?br /> 概念?br /> 1Q?span style="font: 7pt 'Times New Roman'">               描述Struts体系l构Q对应各个部分的开发工作主要包括哪些?

在Struts的体pȝ构中Q模型分Z个部分:pȝ的内部状态和可以改变状态的操作Q事务逻辑Q。内部状态通常׃lActinform Bean表示。根据设计或应用E序复杂度的不同Q这些Bean可以是自包含的ƈh持箋的状态,或只在需要时才获得数据(从某个数据库Q。大型应用程序通常在方法内部封装事务逻辑Q操作)Q这些方法可以被拥有状态信息的bean调用。比如购物RbeanQ它拥有用户购买商品的信息,可能q有checkOut()Ҏ用来查用L信用卡,q向仓库发定货信息。小型程序中Q操作可能会被内嵌在Actionc,它是struts框架中控制器角色的一部分。当逻辑单时q个Ҏ很适合。徏议用户将事务逻辑Q要做什么)与ActioncL扮演的角Ԍ军_做什么)分开。  
   
2Q视图(ViewQ    
视图主要由JSP建立Qstruts包含扩展自定义标{ֺQTagLibQ,可以化创建完全国际化用户界面的过E。目前的标签库包括:Bean Tags、HTML tags、Logic Tags、Nested Tags 以及Template Tags{。  
  
3Q控制器QControllerQ    
在struts中,基本的控制器lg是ActionServletcM的实例serveltQ实际用的servlet在配|文件中׃l映(由ActionMappingc进行描qͼq行定义。对于业务逻辑的操作则主要由Action、ActionMapping、ActionForwardq几个组件协调完成的Q其中Action扮演了真正的业务逻辑的实现者,ActionMapping与ActionForward则指定了不同业务逻辑或流E的q行方向。struts-config.xml 文g配置控制器?br />
2Q?span>    XML包括哪些解释技术,区别是什么?

包括QDOMQDocument Object ModalQ文对象模型,SAXQSimple API for XMLQ。DOM是一ơ性将整个文d内存操作Q如果是文档比较,d内存Q可以极大提高操作的速度Q但如果文比较大,那么q个吃力了。所以此时SAX应用而生Q它不是一ơ性的整个文读入内存,q对于处理大型文档就比较力?

3Q?nbsp;   JSP有哪些内|对象和动作Q它们的作用分别是什?/span>Q?br />
JSP共有以下9U基本内|组Ӟ
request 用户端请求,此请求会包含来自GET/POSTh的参?br />  response |页传回用户端的回应
pageContext |页的属性是在这里管?
session 与请求有关的会话?
application servlet 正在执行的内?br />  out 用来传送回应的输出
config servlet的构枉?br />  page JSP|页本n
exception 针对错误|页Q未捕捉的例?
常用的组Ӟrequest、response、out、session、application、exception


]]>
华ؓ面试题详?1~5)http://www.tkk7.com/supercrsky/articles/167386.html々上善若水?/dc:creator>々上善若水?/author>Thu, 13 Dec 2007 01:37:00 GMThttp://www.tkk7.com/supercrsky/articles/167386.htmlhttp://www.tkk7.com/supercrsky/comments/167386.htmlhttp://www.tkk7.com/supercrsky/articles/167386.html#Feedback0http://www.tkk7.com/supercrsky/comments/commentRss/167386.htmlhttp://www.tkk7.com/supercrsky/services/trackbacks/167386.html阅读全文

]]>
վ֩ģ壺 Ļѹۿ| պa| þþȹ͵ۺ| AVþþƷ| ۺϽ߹ۿ| ŷһ| aɻ߹ۿ| ޾ƷóƬ?V߲| ֻ߹ۿƵ| պƵ| ֻƬþù| ŷëƬAƵ޷| ˳Ƶ| ˳Ƶ| ޾Ʒ˾þþ| Ļղapp| ͬ˧GAYƬ߹ۿ| av뾫ƷϼӰӰԺ | ˾þô߽| պһƷ侫| sŷm봵| ŷƵѹ| 99ƵƷƵ76| Ļպר| ޸߹ۿ| ûվɫƵѹۿ| ޸Ƶһ| ޸XXXXɫ| ޵Ӱһ| վѹۿ| ޹Ʒþ˰| ˺ձjizz| ҹδʮ| ˾þۺ| ַ߹ۿ| һɫƬ| av뾫Ʒۺ| Ʒһ߹ۿ| ŮƵ| ٸѾƷ| ձѹۿ|