日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

ikm java_2013Morgan Stanley IKM assessment

發(fā)布時(shí)間:2024/9/19 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ikm java_2013Morgan Stanley IKM assessment 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

今天做了一下Morgan Stanley 的IKM assessment,我選擇的是java方向,26分鐘,沒有規(guī)定有少道題,都是多選題,5個(gè)選項(xiàng),最多可以選三個(gè)。

感覺這個(gè)系統(tǒng)好特別,比如說有好幾個(gè)選項(xiàng)都是對(duì)的,但是判斷不同選項(xiàng)正確與否的難易程度不一樣,正確選擇到那些比較有含金量的選項(xiàng),最后的得分會(huì)高些。

回憶一下其中的一些題。

1.Java 異常處理

public class Test {

public static void main(String args[]) {

int x = 5;

int y = 0;

int z = 3;

try {

try {

System.out.println(x);

System.out.println(x / y);

System.out.println(z);

} catch (ArithmeticException ae) {

System.out.println("Inner Arithmetic Exception");

throw ae;

} catch (RuntimeException re) {

System.out.println("Inner Runtime Exception");

throw re;

} finally {

System.out.println("Finally");

}

} catch (Exception e) {

System.out.println("Outer Exception");

}

}

}

運(yùn)行結(jié)果:

5

Inner Arithmetic Exception

Finally

Outer Exception

第二句打印中,產(chǎn)生除零異常,這時(shí)捕獲異常的catch塊,首先捕獲到算術(shù)異常,打印出Inner Arithmetic Exception。捕獲到異常后,還可以再次拋出異常之,如代碼中所示。

在同一個(gè)try中,異常被捕獲后不會(huì)再往下傳遞,所以內(nèi)部的第二個(gè)異常捕獲塊沒有捕獲到Runtime Exception。

在異常捕獲之后,finally語句是一定會(huì)執(zhí)行的,一般情況下在finnaly中做一些善后處理工作。這里打印出Finally。

在外層還有catch塊捕獲異常,這里所捕獲的就是剛才又throw出來的異常,所以會(huì)打印出Outer Exception。

如果沒有代碼中的throw語句,外層try{}catch(){}將不會(huì)捕獲到異常。

2. Math的各種用法

public class Test {

public static void main(String args[]) {

double d = -27.2345;

System.out.println(Math.round(d));

System.out.println(Math.abs(d));

System.out.println(Math.floor(d));

System.out.println(Math.ceil(d));

}

}

運(yùn)行結(jié)果:

-27

27.2345

-28.0

-27.0

這題考查的是對(duì)Math各種用法的使用。

(1)long java.lang.Math.round(double a)  對(duì)a四舍五入

Returns the closest long to the argument, with ties rounding up.

Special cases:

If the argument is NaN, the result is 0.

If the argument is negative infinity or any value less than or equal to the value of Long.MIN_VALUE, the result is equal to the value of Long.MIN_VALUE.

If the argument is positive infinity or any value greater than or equal to the value of Long.MAX_VALUE, the result is equal to the value of Long.MAX_VALUE.

(2)double java.lang.Math.abs(double a)  求a的絕對(duì)值

Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:

If the argument is positive zero or negative zero, the result is positive zero.

If the argument is infinite, the result is positive infinity.

If the argument is NaN, the result is NaN.

(3)double java.lang.Math.floor(double a)  求不大于a小的最大值

Returns the largest (closest to positive infinity) double value that is less than or equal to the argument and is equal to a mathematical integer. Special cases:

If the argument value is already equal to a mathematical integer, then the result is the same as the argument.

If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.

(4)double java.lang.Math.ceil(double a)  求不小于a的最小值

Returns the smallest (closest to negative infinity) double value that is greater than or equal to the argument and is equal to a mathematical integer. Special cases:

If the argument value is already equal to a mathematical integer, then the result is the same as the argument.

If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.

If the argument value is less than zero but greater than -1.0, then the result is negative zero.

floor是“地板”,向下取數(shù);ceil是“天花板”,向上取數(shù)。

3. OSI體系結(jié)構(gòu)中的網(wǎng)絡(luò)通信模型,physical layer的功能屬性

隱約記得選項(xiàng)有:比特同步;將package拆分成frame;與Session相關(guān)balalala。。。其他的記不清楚了。

由于時(shí)間本身就不長(zhǎng),加上全英文的題,讀題加上理解都得半天,最后好像就做了15題左右,感覺肯定要悲劇了。

果然像大摩這樣的地方來者不善啊,被小小的打擊了一下。考的內(nèi)容總體來說比較基礎(chǔ),也很細(xì)致,還有一些設(shè)計(jì)模式的題,由于沒有接觸過太多,基本都skip掉了。這應(yīng)該是根據(jù)大摩項(xiàng)目特點(diǎn)有關(guān)系,金融IT項(xiàng)目要求健壯性和維護(hù)性高,需要準(zhǔn)確的細(xì)節(jié)和良好的設(shè)計(jì)作為支撐。

總結(jié)

以上是生活随笔為你收集整理的ikm java_2013Morgan Stanley IKM assessment的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。