Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to find a specific character in a string using array

    public static void main(String[] args) {
        String url = "abc@gmail.com";
        char key = '@';

        char[] ch = url.toCharArray();

        for (int i = 0; i < ch.length; i++) {
            if (key == ch[i]) {
                System.out.println(key + " is in index: "+i);
            }
        }
    }
Comment

PREVIOUS NEXT
Code Example
Java :: java code to implement hybrid interface 
Java :: java -jar -l resourceses.porperties -i ejemplo.txt -o inject.bin 
Java :: h2 database allow remote database creation 
Java :: System.Windows.Interactivity 
Java :: public static void main(String args[]) { level input=new level(System.in); FirstPractice obj1=new FirstPractice(); obj1.loosing(1000); } 
Java :: how to import a self written class in java 
Java :: okhttp Synchronous Network Calls 
Java :: java no enum constant 
Java :: android capture view and animation 
Java :: java to run colored lines 
Java :: split() String android 
Java :: log errors with stack traces spring 
Java :: sha 1 key throguh java is not working 
Java :: how to make a string alphabetic 
Java :: fog command minecraft 
Java :: print out list of letters a to z java 
Java :: java switch expression produce result 
Java :: codding loop 
Java :: login in java with 3 attepmtps 
Java :: how do you create a txt file in java 
Java :: sibling search java program 
Java :: java naming convention acronyms 
Java :: labelled for loop in java 
Java :: last element array java 
Java :: hadoop fs get size of directory java 
Java :: Java Public Access Modifier package one 
Java :: java boolean zen 
Java :: Uri/Beecrowd problem no - 1146 solution in Java 
Java :: i java 
Java :: how to search element in sorted array using java 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =