A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© ma464526717 中级黑马   /  2016-2-24 21:48  /  971 人查看  /  4 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

1DateFormat类中的parse()方法描述正确的是( ) ----- 单选
A、将毫秒值转成日期对象
B、格式化日期对象
C、将字符串转成日期对象
D、将日期对象转成字符串

2将十进制数100转成二进制数用哪个方法( ) ----- 单选
A、toBinaryString()  值是String形式的.
B、toHexString()
C、intValue()
D、toOctalString()

3判断一个字符串是否包含另一个字符串的方法是( ) ----- 单选
A、contains(String str)
B、startsWith(String str)
C、isEmpty()
D、equals(Object obj)

4下列关于Java API的说法错误的是( ) ----- 单选
A、API即Application Programming Interface缩写
B、API是一些接口
C、Java API 提供了已经封装好的Java类
D、Java API蕴含了面向对象封装思想

5关于自动装箱,自动拆箱描述正确的是( ) ----- 单选
A、自动装箱:把包装类类型转换为基本类型
B、自动拆箱:把基本类型转换为包装类类型
C、自动装箱:把基本类型转换为包装类类型
D、以上都不对

6下列程序的输出结果是( ) ----- 单选
class Demo {
publicstaticvoid main(String[] args) {
             String s1 = new String("abc");            
             String s2 = "abc";
            System.out.println(s1 == s2);        
            System.out.println(s1.equals(s2));
        }

    }
A、true false
B、false false
C、true true
D、false true

7System.currentTimeMillis方法的作用是( ) ----- 单选
A、返回值是int类型
B、获取日期对象
C、获取当前时间的毫秒值
D、返回的是一个字符串

8String类中int compareTo(String str)比较两个字符串的返回值一定是: (     )
A、正数 负数 0
B、1  -1  0
C、1  -1
D、1  -1  2

9Math.floor(15.6)运行结果是( ) ----- 单选
A、15.0
B、15
C、16.0
D、16.6

10按要求补全下列代码( ) ----- 单选
统计大串中小串出现的次数
    public static void main(String[] args) {
    String max
    = "woaiheima,heimabutongyubaima,wulunheimahaishibaima,zhaodaogongzuojiushihaoma";
            String min = "heima";
        
        int count = 0;
        int index = 0;
        while((index = max.indexOf(____)) != -1) {
            count++;                                    
            max = max.substring(_______);
        }
    }
A、max0arr.length
B、minindex
C、maxindex + min.length()
D、minindex + min.length()




4 个回复

倒序浏览
本帖最后由 yindalei00 于 2016-2-24 22:23 编辑

1C2A3A4:B5:C6:D  7:C  8:A   9:B  10:D4:B
回复 使用道具 举报
从哪找的??
回复 使用道具 举报
这是什么考试题?
回复 使用道具 举报
常用API中自我测评
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马