분류 전체보기185 Oracle 1z0-808 Exam 2024: Question #9 Oracle 1z0-808 Exam 2024: Question #9 Oracle 1z0-808 Exam : Question #9 해설 질문 원본 내용 Given these two classes: public class Customer { ElectricAccount acct = new ElectricAccount(); public void useElectricity(double kWh) { acct.addKWh(kWh); } } public class ElectricAccount { private double kWh; private double rate = 0.07; private double bill; // methods should be written here at line n1 } Any amount of electricity used by a customer (r.. 2024. 2. 21. Oracle 1z0-808 Exam 2024: Question #8 Oracle 1z0-808 Exam 2024: Question #8 Oracle 1z0-808 Exam: Question #8 해설 질문 원본 내용 Given the following class declarations: class Caller { private void init() { System.out.println("Initialized"); } private void start() { init(); System.out.println("Started"); } } public class TestCall { public static void main(String[] args) { Caller c = new Caller(); c.start(); // line n1 c.init(); // line n2 } } What is the result? A. Compilation f.. 2024. 2. 20. Oracle 1z0-808 Exam 2024: Question #7 Oracle 1z0-808 Exam 2024: Question #7 Oracle 1z0-808 Exam: Question #7 해설 질문 원본 내용 Given the following class declarations: abstract class Planet { protected void revolve() { // line n1 } abstract void rotate(); // line n2 } class Earth extends Planet { void revolve() { // line n3 } protected void rotate() { // line n4 } } And the following main method: Car c1 = new Car("Auto"); Car c2 = new Car("4W", 150, "Manual"); System.out.print.. 2024. 2. 19. Oracle 1z0-808 Exam 2024: Question #6 Oracle 1z0-808 Exam 2024: Question #6 Oracle 1z0-808 Exam: Question #6 해설 질문 원본 내용 Consider the following code: abstract class Planet { protected void revolve() { // line n1 } abstract void rotate(); // line n2 } class Earth extends Planet { void revolve() { // line n3 } protected void rotate() { // line n4 } } Which two modifications, made independently, enable the code to compile? (Choose two.) A. Make the method at line n1 public.. 2024. 2. 19. Oracle 1z0-808 Exam 2024: Question #5 Oracle 1z0-808 Exam 2024: Question #5 Oracle 1z0-808 Exam: Question #5 해설 질문 원본 내용 What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class? A. Encapsulation B. Inheritance C. Abstraction D. Instantiation E. Polymorphism 질문 번역 Java에서 접근 제어자를 사용하여 변수를 보호하고 클래스 내부에 숨기는 개념은 무엇인가요? A. 캡슐화 (Encapsulation) B. 상속 (Inheritance) C. 추상화 (Abstraction) D. 인스턴스화 (Instantiation) E. 다형성 (Pol.. 2024. 2. 18. Oracle 1z0-808 Exam 2024: Question #4 Oracle 1z0-808 Exam 2024: Question #4 Oracle 1z0-808 Exam: Question #4 해설 질문 원본 내용 Consider the following code: public static void main(String[] args) { Short s1 = 200; Integer s2 = 400; Long s3 = (long) s1 + s2; // line n1 String s4 = (String) (s3 * s2); // line n2 System.out.println("Sum is " + s4); } What is the result? A. Sum is 600 B. Compilation fails at line n1. C. Compilation fails at line n2. D. A ClassCastException is thro.. 2024. 2. 18. 이전 1 2 3 4 5 ··· 31 다음