Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

        
AI编程,程序员挑战年入30~100万高级指南 - 职业规划
SpringBoot+SpringSecurity+Vue权限系统高级实战课程        

IDEA永久激活

Java微信小程序电商实战课程(SpringBoot+VUe)

     

AI人工智能学习大礼包

     

PyCharm永久激活

66套java实战课程无套路领取

     

Cursor+Claude AI编程 1天快速上手视频教程

     

2020年全网最全BAT笔试面试题打包分享 PDF 下载


时间:2020-06-18 15:27来源:http://www.java1234.com 作者:小锋  侵权举报
2020年全网最全BAT笔试面试题打包分享 PDF 下载
失效链接处理
2020年全网最全BAT笔试面试题打包分享  PDF 下载



2020年全网最全BAT笔试面试题打包分享!!!

呕心沥血,熬夜苦逼加班整理,希望对大伙有用,坚持每日分享一套Java学习资源干货,一起提高,一起进步!!!

 

2020年全网最全BAT笔试面试题打包获取方式:

微信扫码关注Java资料站公众号

(回复  BAT  获取)


 







 
主要内容:
选择题 
1: 
1.What will happen when you attempt to compile and run the following code?    
2.  
3.class Base    
4.  
5.{   
6.  
7.int i = 99;    
8.  
9.public void amethod()   
10.  
11.{   
12.  
13.       System.out.println("Base.amethod()");   
14.  
15.     }   
16.  
17.     Base()   
18.  
19.{   
20.  
21.     amethod();   
22.  
23.     }   
24.  
25.}    
26.  
27.public class Derived extends Base   
28.  
29.{   
30.  
31.int i = -1;   
32.  
33.          
34.  
35.public static void main(String argv[])   
36.  
37.{   
38.  
39.     Base b = new Derived();   
40.  
41.       System.out.println(b.i);   
42.  
43.       b.amethod();   
44.  
45.     }    
46.  
47.     public void amethod()   
48.  
49.{   
50.  
51.       System.out.println("Derived.amethod()");   
52.  
53.     }    
54.  
55.}    
56.  
57.Choices:  
A.Derived.amethod() -1 Derived.amethod() 
B.Derived.amethod() 99 
C.Compile time error 
D.Derived.amethod() 
2: 
1.Which is the most appropriate code snippet that can be inserted at line 18 in the following code?   
2.  
3.(Assume that the code is compiled and run with assertions enabled)   
4.  
5.1.  import java.util.*;   
6.  
7.2.    
8.  
9.3.  public class AssertTest   
10.  
11.4.  {   
12.  
13.5.      private HashMap cctld;   
14.  
15.6.        
16.  
17.7.      public AssertTest()   
18.  
19.8.      {   
20.  
21.9.          cctld = new HashMap();   
22.  
23.10.         cctld.put("in", "India");   
24.  
25.11.         cctld.put("uk", "United Kingdom");   
26.  
27.12.         cctld.put("au", "Australia");   
28.  
29.13.         // more code...    
30.  
31.14.     }   
32.  
33.15.     // other methods ....     
34.  
35.16.     public String getCountry(String countryCode)   
36.  
37.17.     {   
38.  
39.18.         // What should be inserted here?   
40.  
41.19.         String country = (String)cctld.get(countryCode);   
42.  
43.20.         return country;   
44.  
45.21.     }   
46.  
47.22. }  
A.assert countryCode != null; 
B.assert countryCode != null : "Country code can not be null" ; 
C.assert cctld != null : "No country code data is available"; 
D.assert cctld : "No country code data is available"; 

 

------分隔线----------------------------


锋哥推荐