arrays - Strings are not sequence of characters in java? -
in java, why not possible convert string char array , vice versa? why aren't comparable? char matrixc[][] = {{'s', 't','a', 'c','k'}, {'o','v','e','r'}, {'f','l','o','w'}}; string [] matrixs = {"stack", "over","flow"}; // matrixs=matrixc //not allowed... if (matrixs.equals(matrixc) || matrixc.equals(matrixs) ) { system.out.print("true"); } else system.out.print("false"); //output edited: after research , digging, found answer of first question (why not possible convert string char array , vice versa?) in below link, explained roger_that. hint james. immutable string immutable. meaning? so, have separate string pool in java heap, stores , creates new string literals each time , refer them string objects accordingly. still, have doubts comparison (i talking simple