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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

java题库10

發布時間:2024/4/17 编程问答 20 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java题库10 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.

? ? ? 可變參數的使用規則:

? ?? 1.最后一個參數,前不能由非可變參數

? ? ? ? 2.如果有同名的非可變參數函數,優先匹配

? ? ? ? 3.如果有兩個可以匹配的可變參數函數,錯誤

2.

static final int[] a = { 100,200 };
B.static final int[] a; static { a=new int[2]; a[0]=100; a[1]=200; }
C.static final int[] a = new int[2]{ 100,200 };
D.static final int[] a;?
static void init() { a = new int[3]; a[0]=100; a[1]=200; }

只有A B合法

3.

? ? ? ?同名變量就近原則

4.

? run()方法:在本線程內調用該Runnable對象的run()方法,可以重復多次調用;
start()方法:啟動一個線程,調用該Runnable對象的run()方法,不能多次啟動一個線程;

5.

short 和Short是不同的

6.

Locale.setDefault(new Locale("fr", "FRANCE", "MAC"));The method setLocale(Locale) is undefined for the type DateFormat

7.

Which two scenarios are NOT safe to replace a StringBuffer object with a StringBuilder object? (Choosetwo.)
A. When using versions of Java technology earlier than 5.0.
B. When sharing a StringBuffer among multiple threads.
C. When using the java.io class StringBufferInputStream.
D. When you plan to reuse the StringBuffer to build more than one string.
Answer: AB
Section: All
?

8.

Console中readpassword返回的是char[]而不是string

9.

\s必須使用轉義\

10.

全局變量: return(i++); ? <==> ?return i ; i=i+1;
局部變量: return(i++); ? <==> ?return i ; //應該沒有i=i+1這個動作發生了

總結

以上是生活随笔為你收集整理的java题库10的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。