Question: Consider the following Java declarations ( assume classes People, Student and Worker as discussed in Example 3 . java ) People P 1 = new

Consider the following Java declarations (assume classes People, Student and Worker as discussed in Example3.java)
People P1= new People("Herbert","1/1/2024");
People P2= new Worker("Mortimer","2/2/2000",100000);
People P3= new Student("Abigail","3/3/2005", "Data Science", 3.5);
String S1= new String("Margaret");
Which Java expressions below are NOT legal? Indicate all expressions that are not legal.
Multiple answers: Multiple answers are accepted for this question
Select one or more answers and submit. For keyboard navigation... SHOW MORE
a P1.compareTo(P2)
b P1.compareTo(P3)
P2.compareTo(P3)
d P1.compareTo(S1)
e S1.compareTo(P1)
 Consider the following Java declarations (assume classes People, Student and Worker

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!