0

Need solution!

Hi! Q1: what is heap,stack in java? Q2: String s1="Hello"; String s2 = new String(s1); System.out.print(s1==s2); How output is false Q3: does anyone share about all kinds of exception in java?

5th Dec 2022, 1:17 PM
Mustakim Rahman
Mustakim Rahman - avatar
3 Answers
+ 3
A1: Have you looked it up? Have you googled it? A2: The equals operator == compares equality of instances, not of content/value, hence false. The 2 strings have the same value but are different instances of strings. A3: Have you looked it up? Have you googled it?
5th Dec 2022, 3:30 PM
Lisa
Lisa - avatar
+ 1
Lisa dear mam, when someone share their practical Knowledge then it always easy for me to learn something new something different. That's why i posted those questions🙄.
6th Dec 2022, 5:51 AM
Mustakim Rahman
Mustakim Rahman - avatar