Announcement

Collapse
No announcement yet.

Find recurring character in a string ( the first character of the string)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Find recurring character in a string ( the first character of the string)

    PHP Code:
    public class test {

        public static 
    void main (String [] input_data){

            
    String dato =  input_data[0];
            
    char first_letter dato.charAt(0);
            
    int iposition;


                    for (
    i=1< (dato.length()) ;){

                        
    position dato.indexOf(first_letter ,i) ;

                        if (
    position == -1) {
                            break;
                        }else{
                            
    System.out.print("Posizione ripetuta:") ;
                            
    System.out.print(position) ;
                            
    System.out.print("\n") ;
                            
    iposition 1;
                        }

                    }



        }

    | VFX Artist, C++ Programmer, HW Overclocker | Web: xgiovio.com Email: xgiovio@gmail.com Twitter: @xgiovio
Working...
X

Google Profile


My name is Giovanni Di Grezia, but people call me xgiovio.

Here is my homepage:.

I'm a VFX Artist and Software Developer.

Giovanni Di Grezia