Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class St {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) throws IOException {
- // TODO code application logic here
- BufferedReader b1=new BufferedReader(new InputStreamReader(System.in));
- String s=b1.readLine();
- String t=b1.readLine();
- String news = null;
- //double u=t.hashCode();
- //double q=s.hashCode();
- //double x;
- //.out.print(u+"n"+q);
- int x=t.length();
- int y=s.length();
- for(int i=0;i<y-x-1;i++){
- //news=s.substring(i, i+t.length());
- //x=news.hashCode();
- //System.out.println(news);
- if(t.equals(s.substring(i, i+x))){
- System.out.println(i);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement