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 numbers; | |
| public class Seventh { | |
| public static void main(String[] args) { | |
| String name="Let us always meet each other with smile, for the smile beginning of love."; | |
| System.out.println(name.replace("smile",":)")); | |
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 numbers; | |
| public class Sixth { | |
| public static void main(String[] args) { | |
| String mjQuote="I'm failed over and over and over again in my life that is why I succeed!"; | |
| System.out.println(mjQuote.substring(mjQuote.indexOf("again"),mjQuote.indexOf("again")+"again".length())); | |
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 numbers; | |
| public class Fifth { | |
| public static void main(String[] args) { | |
| String mjQuote="I'm failed over and over and over again in my life that is why I succeed!"; | |
| System.out.println( mjQuote.substring( mjQuote.length()-8, mjQuote.length()-1)); | |
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 numbers; | |
| public class Fourth { | |
| public static void main(String[] args) { | |
| String mjQuote="I'm failed over and over and over again in my life that is why I succeed!"; | |
| int lastNamber=mjQuote.length()-1; | |
| char lastSimvol=mjQuote.charAt(lastNamber); | |
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 numbers; | |
| public class Third { | |
| public static void main(String[] args) { | |
| String name="\"Yuliya\" "; | |
| String str="In my name "; | |
| int size=name.length()-3; |
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 numbers; | |
| public class Second { | |
| public static void main(String[] args) { | |
| String stroka1="**********",stroka2="!!!!!",stroka3="After 1970 has passed",stroka4=" years"; | |
| long a= System.currentTimeMillis()/1000/60/60/24/365; | |
| System.out.print(stroka2); | |
| System.out.print(stroka1+stroka3); |
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 numbers; | |
| public class First { | |
| public static void main(String[] args) { | |
| System.out.println(3*7*24*60*60); | |
| } |
NewerOlder