Question: stringbuffer

Ads

 
 
 

Share on Google+Share on Google+

nani
stringbuffer
1 Answer(s)      8 years ago
Posted in : Java Beginners
Ads
View Answers

November 26, 2008 at 5:32 AM


Hi friend,

Code to help in solving the problem :


public class DeleteString {
public static void main(String args[]) {
StringBuffer sb = new StringBuffer("Rose India Tech");

//Removes the characters at index 10 to 15 in the StringBuffer.
sb.delete(10, 15);
System.out.println("After delete: " + sb);
}
}

For more information on StringBuffer visit to :

http://www.roseindia.net/java/beginners/StringBuffer.shtml

http://www.roseindia.net/java/beginners/

Thanks

Ads









Related Tutorials/Questions & Answers:
StringBuffer
StringBuffer  What's the difference between these two formats? String string=args[0]; String reverse = new StringBuffer(string).reverse().toString(); String string=args[0]; StringBuffer rev = string.reverse(); String
StringBuffer related.
StringBuffer related.  how to make StringBuffer as immutable
Advertisements
StringBuffer and StringBuilder
StringBuffer and StringBuilder  package org.day.strings; import java.io.BufferedReader; public class Test { public static void main(String[] args) { StringBuffer sb1 = new StringBuffer(); sb1.append
stringbuffer - Java Beginners
DeleteString { public static void main(String args[]) { StringBuffer sb = new StringBuffer("Rose India Tech"); //Removes the characters at index 10 to 15 in the StringBuffer. sb.delete(10, 15); System.out.println("After delete
StringBuffer - Java Beginners
StringBuffer  Can any one help with this naughty problem? Replacing a character with two characters in a StringBuffer. Replacing a character...;} converting the StringBuffer using charArray[] also worked well, but not where
String and StringBuffer - Java Beginners
; Hi vijay Java provides the StringBuffer and String classes.... Simply stated, objects of type String are read only and immutable. The StringBuffer... performance difference between these two classes is that StringBuffer is faster
StringBuffer - Java Beginners
StringBuffer  Hi, Thank you so much for answering my previous question regarding StringBuilder And StringBuffer. But,while using more than one...-threaded applications(i.e. StringBuffer)? Please give example(code) and explain
String and stringbuffer object - Java Beginners
String and stringbuffer object  Hi, What is the basic difference between string and stringbuffer object? Thanks   Hi Friend... be changed while StringBuffer class is used to represent characters that can
'String' vs 'StringBuffer' - Java Beginners
'String' vs 'StringBuffer'  What should i use String or StringBuffer?  Hi, First you need to rectify the question. Because StringBuffers... StringBuffer when you are append different data to the same StringBuffer object
Java - StringBuffer class in Java
Java - StringBuffer class in Java       In this example you will learn about StringBuffer class. This example explains how you can use functions provided by the StringBuffer
StringBuilder v/s StringBuffer - Java Beginners
... Threads run simultaneously. But in case of BOTH StringBuilder & StringBuffer... in all respects to StringBuffer except that it is not synchronized, which means... Character!"); String st = buff.readLine(); StringBuffer sb =new
StringBuilder v/s StringBuffer - Java Beginners
between StringBuilder & StringBuffer classes. I know that StringBuffer... inefficient. StringBuilder (or StringBuffer) are better choices in these cases... of programming can be used. StringBuilder is basically identical to the older StringBuffer
Differences between the String, StringBuilder, and StringBuffer classes
Differences between the String, StringBuilder, and StringBuffer classes StringBuffer versus String Java provides the StringBuffer and String classes.... The StringBuffer class is used to represent characters that can be modified
Creation of StringBuffer
Creation of StringBuffer      ... we have used the following StringBuffer Constructors. StringBuffer() //Default Constructor with 16 characters set StringBuffer(String s) //String to String
String Buffer insert and append example
with StringBuffer and append data to it. The StringBuffer is a class that implements...: StringBuffer(int len): This is the constructor of StringBuffer class... of StringBuffer. It takes following parameters:     pos
Write a method which will remove any given character from a string?
as a replacement of StringBuffer. StringBuilder is not synchronized and uses
String reverse in java
; java API provides StringBuffer and StringBuilder  reverse() method which... StringBuffer and StringBuilder methods. For that we will do it by recursive way as well... String Buffer "); String reverses = new StringBuffer(word1).reverse
Java string buffer
Java string buffer  what is stringBuffer and StringBuilder
String doubts - Java Interview Questions
String doubts  difference between String and StringBuffer
How many objects are created in the code below? Explain.
"; StringBuffer s2 = new StringBuffer(s1); StringBuffer s3= s2; StringBuffer s4 = new StringBuffer(s1
explain the difference between string builder and string buffer classes
= "abc"; StringBuffer s2 = new StringBuffer(s1); StringBuffer s3 = s2; StringBuffer s4 = new StringBuffer(s1); } in this example how many objects are created
string reverse order
){ String s= " kalins naik" ; StringBuffer buffer = new StringBuffer(s...()){ StringBuffer sb= new StringBuffer(st.nextToken()); System.out.print(" "+sb.reverse
question
question  can we write calss A extend StringBuffer?   No you cannot extend
Java string buffer
Java string buffer  What is the basic difference between string and stringbuffer object
Java - Development process
Java  whats the difference string and stringbuffer?  Hi... stringBuffer{ public static void main(String[] args) throws Exception... and it's function."; //Create a object of StringBuffer class StringBuffer
(ii) String and String Buffer Class
between String and StringBuffer 1) String object is immutable whereas StringBuffer objects are mutable. 2) String objects are constants
Java - Java Beginners
input=new Scanner(System.in); String str=input.nextLine(); StringBuffer buffer = new StringBuffer(str); StringTokenizer st = new StringTokenizer...(st.hasMoreTokens()){ StringBuffer sb= new StringBuffer(st.nextToken()); System.out.print
STRINGS - Java Beginners
="ANT EATS APPLES"; StringBuffer buffer = new StringBuffer(str...(st.hasMoreTokens()){ StringBuffer sb= new StringBuffer(st.nextToken()); System.out.print
Append Function in Java
  You can use the StringBuffer class in Java to efficiently append... the string is appended to the StringBuffer object you can get the final string through calling the toString() on the StringBufferobject. Use StringBuffer is very
code problem - Java Beginners
h i want to store them as sequence in a StringBuffer like "satish" how..."; StringBuffer strbuf = new StringBuffer(); for(int i=0;i  thank
problem on strings
problem on strings  in string1 "123456 ABC DEF...",IN string2 "raveen". iwant to add string2 after 123456 in the first string based on index number.i need logic for this with out using StringBuffer concept. Thanks in advanace
Tutorials   
Java Spring Hibernate Struts Training What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java Java Example Codes and Tutorials in 2017 How do I read a large file quickly in Java? Is learning Java worthwhile? How to create first Java Program? Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly?

Ads

 
Advertisement null

Ads