Comment on Tutorial - append() in Java By Jagan

Comment Added by : Mohamed firnaz

Comment Added at : 2011-12-07 04:54:27

Comment on Tutorial : append() in Java By Jagan
Excellent. I want you to publish about memory allocation for every sample programs side by side, as it plays a major role in live projects. For example :

public class stringmemory
public static void main(String[] args){
String str = "Sri seshaa";
String str1 = " Sri seshaa";
String str2 = str + str1 + " technologies";

StringBuffer s;
String d;
StringBuffer bufr = new StringBuffer(str);
s = bufr.append(str2);
d = String.valueOf(str);

In this the memory allocated for concatenation in string class is more compared to the append operation in StringBuffer. Like this there are many advantages and disadvantages in it. Please publish it also, it will be helpful for the young programmers like me.

View Tutorial

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Whenever i run this program, it terminates immedia
View Tutorial          By: Salman at 2015-03-26 08:23:32

2. Would be great if you also showed how to manipulat
View Tutorial          By: Sparx at 2010-01-05 13:51:56

3. Hi,

How to implement this 5 files i

View Tutorial          By: Yanosh at 2009-07-16 06:00:14

4. where do i download the DOM and SAX jar?
View Tutorial          By: David at 2011-11-11 03:04:11

5. There is better way to fix this problem..

View Tutorial          By: Sundara Kaku at 2011-07-23 10:38:52

6. I am geting following exception

View Tutorial          By: Raviteja at 2014-06-23 12:46:06

7. Very concise, but it would be more helpful without
View Tutorial          By: Randy at 2010-11-17 14:16:01

8. I get the exception with the message "Permiss
View Tutorial          By: Jan at 2011-07-20 08:58:55

9. good one !
View Tutorial          By: qasim at 2008-05-18 03:16:55

10. Hi
I have done all the steps mentioned abo

View Tutorial          By: Asela at 2012-01-26 18:53:51