black

SCJP程序员认证考试

登录

单项选择题

Given classes defined in two different files: 
1. package util; 
2. public class BitUtils { 
3. private static void process(byte[] b) { } 
4. } 
1. package app; 
2. public class SomeApp { 
3. public static void main(String[] args) { 
4. byte[] bytes = new byte[256]; 
5. // insert code here 
6. } 
7. } 
What is required at line 5 in class SomeApp to use the process method of BitUtils?() 

A. process(bytes);
B. BitUtils.process(bytes);
C. app.BitUtils.process(bytes);
D. util.BitUtils.process(bytes);
E. import util.BitUtils. *; process(bytes);
F. SomeApp cannot use the process method in BitUtils.

相关考题

单项选择题 Given classes defined in two different files:  1. package util;  2. public class BitUtils {  3. public static void process(byte[]) { /* more code here */ }  4. }  1. package app;  2. public class SomeApp {  3. public static void main(String[] args) {  4. byte[] bytes = new byte[256];  5. // insert code here  6. }  7. }  What is required at line 5 in class SomeApp to use the process method of BitUtils?()

单项选择题 34. HashMap props = new HashMap();  35. props.put(”key45”, “some value”);  36. props.put(”key12”, “some other value”);  37. props.put(”key39”, “yet another value”);  38. Set s = props.keySet();  39. // insert code here  What, inserted at line 39, will sort the keys in the props HashMap?()

单项选择题 Given:  ArrayList a = new ArrayList();  containing the values {“1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”} Which code will return 2?()

All Rights Reserved 版权所有©考试题库网(kstiku.com)

备案号:湘ICP备14005140号-3

经营许可证号:湘B2-20140064