1. ÏÂÁдúÂëµÄÊä³ö½á¹ûÊÇ£º
public class Yikes { public static void go(Long n) { System.out.println(\ } public static void go(Short n) { System.out.println(\ } public static void go(int n) { System.out.println(\ } public static void main(String[] args) { short y = 6; long z = 7; go(y); go(z); } } A.
Long Long B.
Short Long C.
int Long D.
int int
ÕýÈ·´ð°¸£ºC
2. ÏÂÃæ²»ÊôÓÚ½Ó¿ÚµÄÊÇ£º£¨£©¡£
A. java.sql.Connection B. java.sql.Driver
C. java.sql.DriverManager D. java.sql.ResultSet ÕýÈ·´ð°¸£ºC
3. synchronized¹Ø¼ü×Ö×öͬ²½£¬¿ÉÒÔʹÓÃÔÚ£º£¨£©¡£ A. ·½·¨ÉÏ B. ½Ó¿ÚÉÏ C. ±äÁ¿ÉÏ D. ÀàÉÏ
ÕýÈ·´ð°¸£ºA
4. ÀàAµÄ¶¨ÒåÈçÏ£º
class A {
protected void f() throws FileNotFoundException {
¡¡¡ } }
ÏÂÁдúÂë¶ÎûÓбàÒë´íÎóµÄÊÇ£º£¨£©¡£ A.
class B extends A {
public void f() throws Exception {
¡¡¡ } } B.
class B extends A {
public void g() throws IOException {
f(); } } C.
class B extends A {
public void g() {
try{
f(); ¡¡¡ }
catch(IOException e) {
¡¡¡ }
catch(FileNotFoundException e1) {
¡¡¡ } } } D.
class B extends A {
public void g() {
try {
f(); }
catch(FileNotFoundException e) {
throw new RuntimeException(e); } } }
ÕýÈ·´ð°¸£ºD
·ÖÎö£º×ÓÀàÖØд¸¸ÀàµÄ·½·¨Ê±ºò²»ÄÜÉùÃ÷Å׳ö±È¸¸Àà´óµÄÒì³£
5. ÏÂÁÐÑ¡ÏîÖÐÄܹ»µÃµ½×Ö·û´®µÄÒ»²¿·ÖµÄµ¥Ðк¯ÊýÊÇ£¨£©¡£
A. INSERT B. SUBSTR C. LPAD D. LEAST ÕýÈ·´ð°¸£ºB
6. ResultSetÌṩÁË»ñÈ¡Êý¾Ý¿âÖÐij¸ö×Ö¶ÎÖµµÄ·½·¨£¬Èç¹ûij¸ö×Ö¶ÎΪNUMBERÀàÐÍ,¿ÉÒÔ»ñÈ¡¸Ã×Ö¶ÎÖµµÄ·½·¨ÊÇ£º( )¡£
A. getNumber() B. getDouble() C. setNumber() D. setDouble() ÕýÈ·´ð°¸£ºB
7. ÏÂÁдúÂë±àÒëºÍÔËÐеĽá¹ûÊÇ£º
public class A { void process() throws Exception { throw new Exception(); } public static void main(String[] args) { A a = new B(); a.process(); } }
class B extends A { void process() { System.out.println(\ } }
A. Êä³ö:B B. ÎÞÊä³ö
C. BÀàµÄprocess·½·¨´¦£¬³öÏÖ±àÒë´íÎó D. ´úÂëa.process();ÐУ¬³öÏÖ±àÒë´íÎó ÕýÈ·´ð°¸£ºD
8. ÏÂÁдúÂë±àÒëºÍÔËÐеĽá¹ûÊÇ£º
public static void main(String[] args) {
}
Float pi = new Float(3.14f); if (pi > 3) { System.out.print(\ } else { System.out.print(\ }
finally { System.out.println(\ }
A. ±àÒëʧ°Ü
B. Êä³ö£ºpi is bigger than 3.
C. Êä³ö£ºpi is bigger than 3. Have a nice day D. Êä³ö£ºpi is not bigger than 3. Have a nice day. ÕýÈ·´ð°¸£ºA
9. ÐèÒª¶ÁÈ¡Ò»¸ö±È½Ï´óµÄÎı¾Îļþ£¬Õâ¸öÎļþÀïÓкܶà×Ö½ÚµÄÊý¾Ý£¬ÄÇôÏÂÁÐ×îºÏÊʶÁÕâ¸öÎļþµÄÑ¡ÏîÊÇ£º£¨£©¡£
A. new FileInputStream(¡°fileName¡±);
B. new InputStreamReader(new FileInputStream(¡°fileName¡±));
C. new BufferedReader(new InputStreamReader(new FileInputStream(¡°fileName¡±))); D. new RandomAccessFile(¡°fileName¡±,¡±+rw¡±); ÕýÈ·´ð°¸£ºC
10. ÔËÐÐÏÂÁгÌÐò£º
public static void main(String[] args) { String str = \ String str1 = \ int index = 0; while ((index = str.indexOf(str1, index)) != -1) { System.out.print(index + \ index += str1.length(); } }
¿ØÖÆ̨Êä³öµÄ½á¹ûÊÇ£º£¨£©¡£ A. 1 10 21 B. 2 11 22 C. 3 13 23 D. 5 13 22 ÕýÈ·´ð°¸£ºB
11. ÔËÐÐÏÂÁдúÂ룬Êä³öΪfalseµÄÊÇ£º£¨£©¡£
A. String st1 = \
System.out.println(\