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 FirstProgramm; | |
/** | |
* Created by Юрий on 04.12.2015. | |
*/ | |
public class SecondsIn3Weeks { | |
public static void main(String[] args) { | |
System.out.println(30 * 60 * 24 * 21); | |
} | |
} |
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 SecondProgramm; | |
/** | |
* Created by Юрий on 05.12.2015. | |
*/ | |
public class Strings { | |
public static void main(String[] args) { | |
String someText = "Some text"; | |
String st1 = "First "; | |
String st2 = "Second"; |
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 SecondProgramm; | |
/** | |
* Created by Юрий on 05.12.2015. | |
*/ | |
public class StringLength { | |
public static void main(String[] args) { | |
String name = "Yuriy"; | |
System.out.println(name.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 SecondProgramm; | |
/** | |
* Created by Юрий on 05.12.2015. | |
*/ | |
public class LastSymbol { | |
public static void main(String[] args) { | |
String mjQuote = "I'm failed over and over and over again in my life and that is why I succeed!"; | |
System.out.println(mjQuote.charAt(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 Lesson1_frame4; | |
/** | |
* Created by Юрий on 05.12.2015. | |
*/ | |
public class Succeed { | |
public static void main(String[] args) { | |
String mjQuote = "I'm failed over and over and over again in my life and that is why I succeed!"; |
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 Lesson1_frame4; | |
/** | |
* Created by Юрий on 05.12.2015. | |
*/ | |
public class Again { | |
public static void main(String[] args) { | |
String mjQuote = "I'm failed over and over and over again in my life and that is why I succeed!"; |
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 Lesson1_frame4; | |
/** | |
* Created by Юрий on 05.12.2015. | |
*/ | |
public class Replace { | |
public static void main(String[] args) { | |
String mtQoute = "Let us always meet each other with smile, for the smile is the beginning of love."; |
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 Lesson1_frame5; | |
/** | |
* Created by Юрий on 05.12.2015. | |
*/ | |
public class MapOfBattleField { | |
public static void main(String[] args) { | |
System.out.println("B B B B B B B B B B"); | |
System.out.println("C B B B C B B B C"); |
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 Lesson1_frame5; | |
/** | |
* Created by Юрий on 05.12.2015. | |
*/ | |
public class TimeMillis { | |
public static void main(String[] args) { | |
long ms = System.currentTimeMillis(); | |
System.out.println(ms); |
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 Lesson1_frame5; | |
/** | |
* Created by Юрий on 06.12.2015. | |
*/ | |
public class DoubleValue { | |
public static void main(String[] args) { | |
double value = 25.6; | |
String val = String.valueOf(value); | |
System.out.println(val.substring(0,2)); |
OlderNewer