//
// CheckString.java
//
public class CheckString
{
public static void main(String arguments[])
{
// create an object
//String str = "Roses are red" ;
String str = new String("Roses are red");
System.out.println(" 1 ");
System.out.println("0123456789012");
System.out.println("Roses are red");
System.out.println(" ");
System.out.println("String is : " + str);
System.out.println("Length is : " + str.length());
System.out.println("Position 3 is : " + str.charAt(3));
System.out.println("Pos 6-9 is : " + str.substring(6, 9));
System.out.println("Char 'a' is at : " + str.indexOf('a'));
System.out.println("\"red\" word at : " + str.indexOf("red"));
System.out.println("Upper case : " + str.toUpperCase());
System.out.println("Lower case : " + str.toLowerCase());
}
}
How to get URL of commentator
-
We sometimes get questions about how to get the web address/URL of a
commentator in our blog. Blogger.com has not provided any way to do that.
However, the...
7 years ago
No comments:
Post a Comment