在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ HTML/ 異常選擇題
什么是 servlet?
HashMap 和 Hashtable
一個(gè)線程的初始狀態(tài)是什么?
Pointcut
SQL
Scrum 中的三大角色
Static 關(guān)鍵字
靜態(tài)變量和實(shí)例變量的區(qū)別?
合并
Initialization and Cleanup
字節(jié)流與字符流
抽象 abstract
& 與 &&
super 關(guān)鍵詞
如何序列化一個(gè)對(duì)象到一個(gè)文件?
構(gòu)造器是否可以被 override
說(shuō)一說(shuō) Java
Callable statement?
What does web module contain?
設(shè)計(jì)一對(duì)一
異常
What is Session in Hibernate?
ApplicationContext 的實(shí)現(xiàn)都有哪些?
@Autowired @Inject @Resource
處理異常的方法
Where 和 Having
Visitor Pattern
Java
JSP 的生命周期?
什么是對(duì)象 (Object)?
接口 Interface
sleep() 和 wait() 的區(qū)別
Super 程序題
Linux
Run-Time Data Areas - 運(yùn)行時(shí)數(shù)據(jù)區(qū)域
this() 和 super() 在構(gòu)造體里怎么用?
what are benefits of using spring?
序列化時(shí)引用的處理?
Servlet 必須實(shí)現(xiàn)什么接口?
hibernate 的三種狀態(tài)
get and load
IoC 的類型?
Multi-Thread
error 和 exception?
序列化時(shí) static 域的處理?
同步 synchronized
Join point?
面向?qū)ο蟮奶卣饔心男┓矫?/span>
Programme
What is SessionFactory in Hibernate?
創(chuàng)建 servlet
statement 和 prepared statement?
必須實(shí)現(xiàn) Serializable 接口的哪個(gè)方法?
HashMap HashTable LinkedHashMap TreeMap
What is the file extension used for hibernate mapping file?
int 與 integer
Problem on chain
What are the steps in the JDBC connection?
查找文件
IoC containers 類型?
multi to multi
Connection Pooling ?
Spring
序列化時(shí)要注意什么?
Externalizable 接口?
StringBuffer 相關(guān)問題
如何控制 serialization 的過程?
What does the Class.forName("MyClass") do?
Full join
JSP
Bean Factory 與 ApplicationContext 的區(qū)別?
Introduction?
Transient 關(guān)鍵字
Ear, Jar 和 War 文件的區(qū)別?
What do you understand by JSP Actions?
servlet 生命周期?
J2EE客戶端有哪些類型?
作用域的區(qū)別
Java Data Types - Java 數(shù)據(jù)類型
Static 相關(guān)問題
多態(tài) Polymorphism
synchronized method 和 synchronized statement?
什么是自動(dòng)裝配
GC 就一定能保證內(nèi)存不溢出嗎?
Singleton bean 是線程安全的嗎?
Spring 都有哪些模塊?
ArrayList 和 Vector
heap 和 stack
preemptive scheduling 和 time slicing?
abstract 相關(guān)問題
所有的線程都必須實(shí)現(xiàn)哪個(gè)方法?
你更傾向于哪種 DI
Collection
一個(gè) .java 源文件是否可以包含多個(gè)類
每一個(gè) try 都必須有一個(gè) catch 嗎?
JSP translation?
基礎(chǔ)程序題
都使用過哪些join?
守護(hù)線程 daemon thread?
如何實(shí)現(xiàn) muliti-thread?
What are considered as a web component?
封裝 Encapsulation
Bean lifecycle
什么是 Spring 的配置文件?
final 關(guān)鍵字
數(shù)組相關(guān)問題
Article11
Does Java support multiple inheritance?
SessionFactory 是線程安全的嗎?
接口和抽象的區(qū)別
Singleton 單例模式
DAO
What's sprint?
Scrum
How to scrum
列舉出2個(gè) IDE
== 和 equal 的區(qū)別
Hibernate
Hibernate是什么?
Annotation-based container configuration?
inner join
列出文件列表
Collection 相關(guān)問題
What type of wildcards have you used?
try 模塊里的 return
final, finally, finalize的區(qū)別
Java 為什么是高效的 ( High Performance )?
One to multi
Gabage Collection
通知的類型?
什么是依賴注入 - Dependency Injection?
How can you inject Java Collection in Spring?
integer 通過 == 比較
所有類的基類是哪個(gè)類?
反射機(jī)制
什么是 Spring beans?
Continuous integration
一個(gè)類是由哪些變量構(gòu)成的?
什么是 AOP?
equals() 與 hashcode()
都有哪些 bean scope?
序列化 serialization
JSP language
什么是 Spring?
什么是事務(wù) - transaction
this 程序題
J2EE 應(yīng)用的四個(gè)部分?
Stored Procedure?
URI 和 URL?
JDK JRE JVM?
Path 與 Classpath?
Left/Right join
字符串基礎(chǔ)問題
IoC 有什么好處?
What does application client module contain?
sorted 和 ordered collection
把對(duì)象聲明成異常
Union 和 Union all?
什么是 J2EE?
什么情況下要使用序列化?
基礎(chǔ)概念題
Checked 異常與 Runtime 異常
異常選擇題
IoC container 是什么?

異常選擇題

題目一

下面哪個(gè)不對(duì)

  1. RuntimeException is the superclass of those exceptions that must be thrown during the normal operation of the JVM

  2. A method is not required to declare in its throws clause any subclasses of RuntimeExeption that might be thrown during the execution of the method but not caught.

  3. An RuntimeException is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.

  4. NullPointerException is one kind of RuntimeException

答案是 3

RuntimeException an unchecked exception. It doesn't need to be explicitly declared or catched.

題目二

特殊情況就是里面加 return

舉個(gè)例子去理解

    public int getNumber() {

        int a = 0;

        try {
            String s = "t"; ------------------------(1)
            a = Integer.parseInt(s);-----------(2)
            return a;
        } catch (NumberFormatException e) {
            a = 1;-----------------------------------(3)
            return a;-------------------------------(4)
        } finally {
            a = 2;-----------------------------------(5)
        }
    }

1、程序中標(biāo)記的代碼的執(zhí)行順序? 2、改程序的最后返回值(外部調(diào)用時(shí))?

程序按順序從上到下執(zhí)行到(2), 字符"t"轉(zhuǎn)換成整數(shù)失敗, 產(chǎn)生異常并被捕獲, 于是對(duì)a賦值成1, 并將此值作為此方法的返回值(可以這么認(rèn)為, 該方法有一個(gè)存放返回值的空間, 此時(shí)將1放在此處). 由于存在finally塊, 在返回前將該方法的內(nèi)部變量a修改成2. 所以程序?qū)礃?biāo)記的順序執(zhí)行, 外部調(diào)用該方法時(shí)得到的結(jié)果是1

先執(zhí)行try或catch里里面的代碼,然后再執(zhí)行finally,再執(zhí)行try或catch里面的return.

題目三

寫出你最常見到的5個(gè)runtime exception

  • ClassCastException
  • IllegalArgumentException
  • NullPointerException
  • IndexOutOfBoundsException
  • ArrayIndexOutOfBoundsException

題目四