SHARE
TWEET

Untitled

a guest Oct 19th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.company;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         String str1, str2,str3, str4;
  7.         str1= "Andrey Yerzhov";
  8.         str2="ICS126";
  9.         str3="Annna";
  10.         str4="Yerzhov Andrey Alexandrovich";
  11.         StringMethods str = new StringMethods();
  12.         System.out.print("Task #1. String ends with 'ed': ");
  13.         if(str.StringEnding(str1)) System.out.println("True");
  14.         else System.out.println("False");
  15.         System.out.print("Task #2. The sum of all digits in the string = ");
  16.         System.out.println(str.SumOfDigit(str2));
  17.         System.out.print("Task #3. Length of the longest block = ");
  18.         System.out.println(str.LongestBlock(str3));
  19.         System.out.println("Task #4. All words founded in the string:");
  20.         str.FindWords(str4);
  21.         System.out.print("Task #5. The mix of two strings:");
  22.         str.TwoStrings(str2,str3);
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top