可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

Given classes defined 


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.
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、Given:   10. class&ens

Given:  10. class One {  11. void foo() { }  12. }  13. class Two e...

2、Given: 3.public class MyTag

Given:3.public class MyTagHandler extends TagSupport {4.public int doStartTag() {5.// insert code here6.//&...

3、Given a Filter class&e

Given a Filter class definition with this method:21.public void doFilter(ServletRequest request,22.ServletRespon...

4、Given: class ClassA {} clas

Given:class ClassA {}class ClassB extends ClassA {}class ClassC extends ClassA {}and:ClassA p0 = n...

5、Given: If class Donkey&ens

Given:If class Donkey is invoked twice, the first time without assertions enabled,and the second&...

6、Given a class Repetiti

Given a class Repetition:Which code should be inserted at line 1 of Demo.java to compile ...