Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
timihg388yA String is a char sequence, but there are also others like stringbuffer. just use charseq.toString()
-
timihg388ycharsequence is an interface, so it doesnt necessarily implement the toString method. cant you just use a string instead? it implements the charsequence interface
-
Just try checking if it's null and if length returns a value >0. If both is true to string should work. Else try the construction worker method and iterate over the whole sequence and add char by char with charAt.
Related Rants
Wait, what am i missing? Learning java and got charSequence cannot be converted to string. Isn't a string a sequence of characters??? 🤔🤔🤔
undefined
java
is stupid