L
L
lover_loser2020-11-16 23:01:40
Java
lover_loser, 2020-11-16 23:01:40

The string is not broken into characters Array type expected found javalangString What to do?

5fb2da8d30024320504513.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Cheypnow, 2020-11-16
@lover_loser

Characters in a string cannot be accessed via []. If you need to get an array of characters from a string, use toCharArray().

D
Dmitry Roo, 2020-11-17
@xez

Here's what you need to do:
1. Style the code with text using the appropriate tag.
2. Read a book about java - this is an elementary question.
3. Use the contains method to check the occurrence of one string in another. For example:Boolean isContains = addEmail.contains("@")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question