Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static int findChar(String s, char target, int offset) {
        int l = s.length();
        int i = offset;
        int found = -1;
        while (i < l) {
            if (s.charAt(i) == target) {
                found = i;
                i = l;
            }
            i++;
        }
        return found;
    }
}