项目作者: punit81

项目描述 :
This is a program to test efficiency of String, StringBuffer and StringBuilder Concatenation operation(i.e over 24 concatenations) and calculate their execution timings.
高级语言: Java
项目地址: git://github.com/punit81/myapp.git
创建时间: 2021-01-26T09:32:05Z
项目社区:https://github.com/punit81/myapp

开源协议:

下载


This is a program to test efficiency ofString,StringBuffer and StringBuilder Concatenation operation(i.e over 24 concatenations) and calculate their execution timings.

Steps to run this project.

1.Clone this project.
2.Open command prompt
3.Go inside Maventesting folder
4.run following commands:
$> mvn compile
$> mvn package
$> java -cp target/Maventesting-1.0-SNAPSHOT.jar com.punit.MavenTesting.App

Your output will be something like this:

This is a program to test efficiency ofString,StringBuffer and StringBuilder Concatenation operation(i.e over 24 concatenations)
This is the sample string for concatenation:Hello
Time taken by String to concatenate 24 times is:1721212ms
Time taken by StringBuffer to concatenate 24 times is:748815ms
Time taken by StringBuilder to concatenate 24 times is:577437ms
$>