Skip to content

Instantly share code, notes, and snippets.

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",":)"));
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()));
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));
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);
package numbers;
public class Third {
public static void main(String[] args) {
String name="\"Yuliya\" ";
String str="In my name ";
int size=name.length()-3;
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);
package numbers;
public class First {
public static void main(String[] args) {
System.out.println(3*7*24*60*60);
}