Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-15-2008, 12:52 AM   #1 (permalink)
prabhu20
Recruit
 
Join Date: Jun 2008
Posts: 1
prabhu20 is on a distinguished road
Help in Strings

What is meant by 'string' and 'string buffer'
What are the differences.Please help me

What is use of Capacity method.How does it work?
prabhu20 is offline   Reply With Quote
Old 06-15-2008, 10:13 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,166
Belisarius is on a distinguished road
In Java, and Object is a very abstract representation of data. "System" is a representation of the computer you're working on, "Socket" is a representation of a network connection, so on and so forth.

A "String" is an Object that represents words. For instance, everything I've typed could be represented as a "String". A "StringBuffer" is an Object much like a "String", but designed to be more efficient and faster, as the cost of flexibility. You need to do a little bit more work as a programmer to use StringBuffers, but your code will be faster as a result.

The "capactity" method is described in the Javadoc for StringBuffer, which can be found here. I have a link to the API at the top of the Java forum here - I suggest you take a quick look there as it's very helpful to any Java programmer.
__________________
GitS

Last edited by Belisarius; 07-26-2008 at 08:04 AM.
Belisarius is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
strings js2006 Standard C, C++ 6 11-08-2006 12:47 PM
qsort() fails on an array of char* strings fp_unit Standard C, C++ 1 01-28-2006 04:15 PM
Is it necessary to use strings for this assignment? ZimbuTM Java 3 10-19-2005 05:20 PM
Looping search strings. phill2000star PHP 4 07-18-2005 04:37 PM
New Tutorials: ASP Strings, and Visual Studio/VB.NET sde Code Newbie News 0 03-25-2004 06:37 PM


All times are GMT -8. The time now is 02:25 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting