Task 9: Write a java program to make a String("Java is an Object Oriented...
Task 9: Write a java program to make a String("Java is an Object Oriented Language") using "StringBuffer" and "StringBuilder" and also traverse through both the Strings and print the traversal time in milliseconds. Also observe which String class is faster than the other. Solution: So I write a code containing two classes onne for buffer and one for builder and use system time to calculate the traversal time in both having the same string value and observe that builder is fast than buffer.