Use the indexOf
method on a String object. For example,
"ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf('F')
returns 5.
More Related Contents:
- Converting String to Integer error
- Make copy of an array
- To prevent a memory leak, the JDBC Driver has been forcibly unregistered
- Best way to parseDouble with comma as decimal separator?
- Why filter() after flatMap() is “not completely” lazy in Java streams?
- What is a fat JAR? [duplicate]
- How to switch to the new browser window, which opens after click on the button?
- Java: run as administrator
- Mod in Java produces negative numbers [duplicate]
- Different names of JSON property during serialization and deserialization
- Does a TCP socket connection have a “keep alive”?
- Passing multiple variables in @RequestBody to a Spring MVC controller using Ajax
- Generic type inference not working with method chaining?
- Embedded MongoDB when running integration tests
- How to make Lombok and AspectJ work together?
- Intellij Cannot resolve symbol on import
- org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
- What is thread Safe in java? [duplicate]
- Running a JAR file without directly calling `java`
- How to includes all images in jar file using eclipse
- Enable CORS in Spring 5 Webflux?
- Java 8 Stream, getting head and tail
- find out the differences between two java beans for version tracking
- Directory listener in Java
- IntelliJ cannot find any declarations
- False boolean = True?
- Regex Pattern Catastrophic backtracking
- Android : Socket – java.net.SocketException: sendto failed: EPIPE (Broken pipe)
- Java Quartz scheduled Job – disallow concurrent execution of Job
- Log4j Warning while initializing? [duplicate]