Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello This question is related with java language I hope to answer it without ha

ID: 3601352 • Letter: H

Question

Hello

This question is related with java language

I hope to answer it without handwriting, please...

Thank you ..

Given the following declaration int i1 = 1; Int i2 = 2 String S1 = "Hello", String S2 "HELLO". double d1 = 1.0 double d2 2; For each of the tollowing comparisons, specity * Which are syntactically correct? . Which are syntactically incorrect? * Which are syntactically correct but logically questionable? Only specify the answer on the following table; an example is given Syntactically Syntactically Syntacticallycorrect, but incorrect Comparisons logically uestionable correct sl--"Hello" s1 ==d1 i2_d2 null i1 equals (i2) d1.equals(d2) (s1-s2).equals(null) i1-12 == 0 s1.equals (s2)

Explanation / Answer

i1 == i2 : Syntactically correct
d1 == d2 : Syntactically correct
s1 == "Hello" : Syntactically correct
s1 == s2 : Syntactically correct
s1 == d1 : Syntactically incorrect
i2-d2 == null : Syntactically incorrect
i1.equals(i2) : Syntactically incorrect
d1.equals(d2) : Syntactically incorrect
(s1-s2).equals(null) : Syntactically correct, but logically questionable
i1-i2 == 0 : Syntactically correct
s1.equals(s2) : Syntactically correct

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote