Hello, Running de code in java will gave me 'false false'. In the Tests it says true and false
public static void main(String[] args) { String myStr = "good"; char[] myCharArr = {'g', 'o', 'o', 'd' }; String newStr = null; for(char ch : myCharArr){ newStr = newStr + ch; } System.out.println((newStr == myStr)+ " " + (newStr.equals(myStr))); }
About Question enthuware.ocajp.i.v7.-2.-1392 :
Moderator: admin
-
- Posts: 1
- Joined: Fri May 15, 2015 10:03 am
- Contact:
-
- Site Admin
- Posts: 10386
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1392 :
I see that the correct answer is indeed set as option 4, which is false false.
Who is online
Users browsing this forum: No registered users and 14 guests