Online Access Free 1Z1-803 Practice Test
| Exam Code: | 1Z1-803 |
| Exam Name: | Java SE 7 Programmer I |
| Certification Provider: | Oracle |
| Free Question Number: | 216 |
| Posted: | Sep 02, 2026 |
Given:
class Base {
// insert code here
}
public class Derived extends Base{
public static void main(String[] args) {
Derived obj = new Derived();
obj.setNum(3);
System.out.println("Square = " + obj.getNum() * obj.getNum());
}
}
Which two options, when inserted independently inside class Base, ensure that the class is being properly encapsulated and allow the program to execute and print the square of the number?
Given the code fragment:
public static void main(String[] args) { int iArray[] = {65, 68, 69}; iArray[2] = iArray[0]; iArray[0] = iArray[1]; iArray[1] = iArray[2]; for (int element : iArray) { System.out.print(element + " "); }

