Created
February 23, 2016 16:06
-
-
Save alexejVasko/85ee746a09e6393798db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package task1; | |
import java.util.Scanner; | |
public class New { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
String s1 = scanner.nextLine(); | |
System.out.println("input string = " + s1); | |
System.out.println(); | |
if (s1.indexOf("new") >= 0) | |
System.out.println("string after NEW = " + s1.substring(s1.indexOf("new")+3, s1.length())); | |
else System.out.println("no NEW...."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment