Package my.zhamri.myexample
Class MySimpleString
java.lang.Object
my.zhamri.myexample.MySimpleString
public class MySimpleString
extends java.lang.Object
This class is for manipulating strings
-
Constructor Summary
Constructors Constructor Description MySimpleString()
-
Method Summary
Modifier and Type Method Description void
displayString(java.lang.String str)
This method is for displaying a string.int
getLength(java.lang.String name, java.lang.String address)
This method is for counting the length of your name and your home address.
-
Constructor Details
-
MySimpleString
public MySimpleString()
-
-
Method Details
-
getLength
public int getLength(java.lang.String name, java.lang.String address)This method is for counting the length of your name and your home address.- Parameters:
name
- Your full name which including the first name and last name.address
- Your home address.- Returns:
- The total length of the name and address.
-
displayString
public void displayString(java.lang.String str)This method is for displaying a string.- Parameters:
str
- Either your name or your address.
-