Question 1 What is the purpose of packages? (check all that apply) Enable public access to classes Organize classes Avoid naming conflicts To define common super type of logically related classes 0.5 / 1 pts
Incorrect Question 2 What is the output of the following code? public class Test { public static void main(String[] args) { new Person().printPerson(); new Student().printPerson(); } } class Student extends Person { @Override public String getInfo() { return "Student"; } } class Person { public String getInfo() { return "Person"; } public void printPerson() { System.out.println(getInfo()); } Person Person O Student Person O Student Student O Person Student } 0/1 pts
Question 2 Which lambda expression properly implements the following interface? public interface Incident { void handle(); } () => { System.out.println("hello"); } (handle) -> { System.out.println("hello"); } ()-> { System.out.println("hello"); } Incident() -> { System.out.println("hello"); } 0/1 pts
Partial Partial Question 1 What is the purpose of packages? (check all that apply) Enable public access to classes Organize clas
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am