Oracle
1Z0-851 · Question #25
Given classes defined in two different files: package util; public class BitUtils { private static void process(byte[] b) {} } 01. package app; 02. public class SomeApp { 03. public static void…
The correct answer is F. SomeApp cannot use the process method in BitUtils. See the full explanation below for the reasoning.
Question
Given classes defined in two different files: package util; public class BitUtils { private static void process(byte[] b) {} } 01. package app; 02. public class SomeApp { 03. public static void main(String[] args) { 04. byte[] bytes = new byte[256]; 05. // insert code here 06. } 07. } What is required at line 5 in class SomeApp to use the process method of BitUtils?
Options
- Aprocess(bytes);
- BBitUtils.process(bytes);
- Capp.BitUtils.process(bytes);
- Dutil.BitUtils.process(bytes);
- Eimport util.BitUtils.*; process(bytes);
- FSomeApp cannot use the process method in BitUtils.
How the community answered
(41 responses)- A2% (1)
- B5% (2)
- C10% (4)
- D2% (1)
- F80% (33)
Community Discussion
No community discussion yet for this question.